mirror of
https://github.com/wassname/phaser.git
synced 2026-06-27 16:10:15 +08:00
Updated grunt script so it can copy the build files to the right location.
This commit is contained in:
@@ -40,6 +40,7 @@ module.exports = function (grunt) {
|
||||
'* -- Albert Einstein\n' +
|
||||
'*/\n',
|
||||
|
||||
release_dir: 'build',
|
||||
compile_dir: 'dist',
|
||||
|
||||
p2: [
|
||||
@@ -274,6 +275,23 @@ module.exports = function (grunt) {
|
||||
|
||||
},
|
||||
|
||||
copy: {
|
||||
main: {
|
||||
files: [
|
||||
{ src: ['dist/phaser.js'], dest: 'build/phaser.js' },
|
||||
{ src: ['dist/phaser.min.js'], dest: 'build/phaser.min.js' },
|
||||
{ src: ['dist/phaser.map'], dest: 'build/phaser.map' },
|
||||
|
||||
{ src: ['dist/p2.js'], dest: 'build/custom/p2.js' },
|
||||
{ src: ['dist/p2.min.js'], dest: 'build/custom/p2.min.js' },
|
||||
{ src: ['dist/phaser-no-libs.js'], dest: 'build/custom/phaser-no-libs.js' },
|
||||
{ src: ['dist/phaser-no-libs.min.js'], dest: 'build/custom/phaser-no-libs.min.js' },
|
||||
{ src: ['dist/pixi.js'], dest: 'build/custom/pixi.js' },
|
||||
{ src: ['dist/pixi.min.js'], dest: 'build/custom/pixi.min.js' }
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
examples: {
|
||||
all: {
|
||||
options: {
|
||||
@@ -298,5 +316,6 @@ module.exports = function (grunt) {
|
||||
|
||||
grunt.registerTask('default', ['build', 'examples']);
|
||||
grunt.registerTask('build', ['clean', 'concat', 'uglify']);
|
||||
grunt.registerTask('dist', ['clean', 'concat', 'uglify', 'copy']);
|
||||
|
||||
};
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@
|
||||
"grunt": "~0.4.1",
|
||||
"grunt-contrib-concat": "~0.3.0",
|
||||
"grunt-contrib-connect": "~0.5.0",
|
||||
"grunt-contrib-copy": "~0.4.1",
|
||||
"grunt-contrib-copy": "~0.5.0",
|
||||
"grunt-contrib-clean": "~0.5.0",
|
||||
"grunt-contrib-uglify": "~0.3.3",
|
||||
"lodash": "~2.2.1"
|
||||
|
||||
Reference in New Issue
Block a user