Commit 895e7e2b authored by Robert Knight's avatar Robert Knight

Output the sidebar app URL and asset root URL after the first build

Print the sidebar app URL and asset root URL that were baked into the
client after the first build.

This is useful to verify that the build was run with the expected
environment.
parent bb55a41c
......@@ -252,6 +252,8 @@ function packageServerHostname() {
return process.env.PACKAGE_SERVER_HOSTNAME || 'localhost';
}
var isFirstBuild = true;
/**
* Generates the `build/boot.js` script which serves as the entry point for
* the Hypothesis client.
......@@ -272,6 +274,12 @@ function generateBootScript(manifest) {
defaultAssetRoot = `http://${packageServerHostname()}:3001/hypothesis@${version}/`;
}
if (isFirstBuild) {
gulpUtil.log(`Sidebar app URL: ${defaultSidebarAppUrl}`);
gulpUtil.log(`Client asset root URL: ${defaultAssetRoot}`);
isFirstBuild = false;
}
gulp.src('build/scripts/boot.bundle.js')
.pipe(replace('__MANIFEST__', JSON.stringify(manifest)))
.pipe(replace('__ASSET_ROOT__', defaultAssetRoot))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment