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

Commit

Permalink
Fixes #5
Browse files Browse the repository at this point in the history
  • Loading branch information
cloakedninjas committed Jan 6, 2019
1 parent 7398a47 commit 574966b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 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
6 changes: 3 additions & 3 deletions gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,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 @@ -58,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 @@ -83,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

0 comments on commit 574966b

Please sign in to comment.