Skip to content

Commit

Permalink
Merge pull request #7206 from cb1kenobi/timob-19549
Browse files Browse the repository at this point in the history
[TIMOB-19549] Fixed bug where minified JS files were overriding the o…
  • Loading branch information
cheekiatng committed Sep 20, 2015
2 parents cc44625 + 13bd2cb commit 88c930e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion iphone/cli/commands/_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -4479,8 +4479,10 @@ iOSBuilder.prototype.copyResources = function copyResources(next) {

if (this.minifyJS) {
this.cli.createHook('build.ios.compileJsFile', this, function (r, from, to, cb2) {
if (!fs.existsSync(to) || r.contents !== fs.readFileSync(to).toString()) {
var exists = fs.existsSync(to);
if (!exists || r.contents !== fs.readFileSync(to).toString()) {
this.logger.debug(__('Copying and minifying %s => %s', from.cyan, to.cyan));
exists && fs.unlinkSync(to);
fs.writeFileSync(to, r.contents);
this.jsFilesChanged = true;
} else {
Expand Down

0 comments on commit 88c930e

Please sign in to comment.