Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-23820] Liveview: on classic apps Hyperloop requires in app.js … #98

Merged
merged 2 commits into from
Dec 9, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions hook/lvhook.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ exports.init = function(logger, config, cli) {
debug('Running pre:build.'+cli.argv.platform+'.writeBuildManifest hook');
if (cli.argv.liveview) {
data.args[0].liveview = true;

var tempAppJS = path.resolve(cli.argv['project-dir'], 'Resources', '.liveviewapp.js');
fs.existsSync(tempAppJS) && fs.unlinkSync(tempAppJS);
}

// backwards compatibility
Expand Down Expand Up @@ -121,6 +124,7 @@ exports.init = function(logger, config, cli) {
var resourceDir = path.resolve(cli.argv['project-dir'], 'Resources');
var liveviewJS = join(tempdir(), 'liveview.js');
cp('-f', join(__dirname, '../build/liveview.js'), liveviewJS);
cp('-f', join(resourceDir, 'app.js'), join(resourceDir, '.liveviewapp.js'));

var ipAddr = cli.argv['liveview-host'] || getNetworkIp();
var fileServerPort = cli.argv['liveview-fport'] || 8324;
Expand Down