Skip to content
This repository has been archived by the owner on Apr 27, 2022. It is now read-only.

Commit

Permalink
Merge pull request #6 from cloakedninjas/dev
Browse files Browse the repository at this point in the history
Various fixes & package updates
  • Loading branch information
cloakedninjas committed Jan 6, 2019
2 parents 21b0f49 + 281e967 commit bfeaf9b
Show file tree
Hide file tree
Showing 5 changed files with 1,294 additions and 759 deletions.
18 changes: 18 additions & 0 deletions bin/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,24 @@ function promptForPhaserBuild() {
}
});

filename = 'gruntfile.js';

fs.readFile(filename, 'utf8', function (err, data) {
if (err) {
console.warn(styleText('Failed to open gruntfile.js\nYou will need to update it manually to point to phaser-ce', 'yellow'));
console.warn(err);
} else {
var result = data.replace(/node_modules\/phaser\//, 'node_modules\/phaser-ce\/');

fs.writeFile(filename, result, 'utf8', function (err) {
if (err) {
console.warn(styleText('Failed to update gruntfile.js\nYou will need to update it manually to point to phaser-ce', 'yellow'));
console.warn(err);
}
});
}
});

setPhaserDep('phaser-ce');
} else {
setPhaserDep('phaser');
Expand Down
9 changes: 5 additions & 4 deletions gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ module.exports = function (grunt) {
module: 'amd', //or commonjs
target: 'es5', //or es3
sourceMap: false,
declaration: false
declaration: false,
rootDir: 'src/scripts'
}
},
prod: {
Expand Down Expand Up @@ -37,7 +38,7 @@ module.exports = function (grunt) {
dest: 'public/index.html'
},
{
src: 'node_modules/phaser-ce/build/custom/phaser-no-physics.js',
src: 'node_modules/phaser/build/custom/phaser-no-physics.js',
dest: 'public/vendor/phaser/phaser.js'
}
]
Expand All @@ -57,7 +58,7 @@ module.exports = function (grunt) {
dest: 'public/index.html'
},
{
src: 'node_modules/phaser-ce/build/custom/phaser-no-physics.js',
src: 'node_modules/phaser/build/custom/phaser-no-physics.js',
dest: 'public/vendor/phaser/phaser.js'
}
]
Expand All @@ -82,7 +83,7 @@ module.exports = function (grunt) {
uglify: {
prod: {
files: {
'public/game.min.js': ['public/game.min.js']
'public/game.min.js': ['public/vendor/phaser/phaser.js', 'public/game.min.js'],
}
}
}
Expand Down
Loading

0 comments on commit bfeaf9b

Please sign in to comment.