Skip to content

Commit

Permalink
Merge pull request #34 from euforic/TIMOB-14101
Browse files Browse the repository at this point in the history
[TIMOB-14101] app.js in Resources Dir overwritten on recompile
  • Loading branch information
Christian Sullivan committed Jun 10, 2013
2 parents d1b33f3 + ac12cf0 commit c9da949
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 26 deletions.
26 changes: 1 addition & 25 deletions hook/lvhook.js
Expand Up @@ -106,10 +106,7 @@ exports.init = function(logger, config, cli) {
destFile = data.args[1];

if (srcFile == join(this.projectDir, 'Resources', 'app.js')) {
data.args[1] = join(path.dirname(destFile), '_app.js');
var lvSrc = join(tempdir(),'liveview.js');
var lvDest = join(data.ctx.xcodeAppDir,'app.js');
cat(lvSrc).to(lvDest);
data.args[0] = join(tempdir(),'liveview.js');
}
}
finished(data);
Expand All @@ -126,27 +123,6 @@ exports.init = function(logger, config, cli) {
}
});

/**
* Replace and rename original app.js file to execute liveview.js first
*/

// cli.addHook('build.ios.compileJsFile', {
// pre: function(data, finished) {
// debug('Running pre:build.ios.compileJsFile hook');
// if (cli.argv.liveview) {
// var target = data.args[0];
// if (target.from == join(this.projectDir, 'Resources', 'app.js')) {
// target.path = '_app.js';
// target.to = target.to.substring(0, target.to.length - 13) + 'liveview.js';
// } else if (target.from == join(this.projectDir, 'Resources', 'liveview.js')) {
// target.path = 'app.js';
// target.to = target.to.substring(0, target.to.length - 13) + 'app.js';
// }
// }
// finished(data);
// }
// });

/**
* Set LiveView flag for legacy android builder.py
*/
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "liveview",
"version": "0.1.22",
"version": "0.1.24",
"description": "Titanium Live Realtime App Development",
"main": "index.js",
"private": true,
Expand Down

0 comments on commit c9da949

Please sign in to comment.