Fixes namespace collision & allows command-line options to be passed to UI build system (#3876)

* Fixes BrowserSync window.name namespace collision #3872

* Allow command-line arguments to be passed to development UI builds.
Add support for --ng-debug and --router-debug flags to turn on Angular's
$log service and ui-router's trace utility.
Cleans up development debug settings & defunct websocket configuration.

Resolves lingering issues raised by trying read asynchronously-loaded config file during AngularJS config phase. #3872

* shrinkwrap updated minimist

* update CONTRIBUTING.md to include UI build options

* feedback/review
This commit is contained in:
Leigh Johnson
2016-11-09 12:49:18 -05:00
committed by GitHub
parent fe24d0fe0f
commit 0d3eb67bd0
8 changed files with 431 additions and 442 deletions

View File

@@ -1,5 +1,16 @@
var path = require('path'),
webpack = require('webpack');
var awx_env,
path = require('path'),
webpack = require('webpack'),
options = require('minimist')(JSON.parse(process.env.npm_config_argv).remain),
merge = require('lodash').merge;
awx_env = {
'proxy': {
'django_host': process.env.npm_package_config_django_host,
'django_port': process.env.npm_package_config_django_port
}
};
merge(awx_env, options);
var vendorPkgs = [
'angular',
@@ -54,6 +65,7 @@ var dev = {
}),
// (chunkName, outfileName)
new webpack.optimize.CommonsChunkPlugin('vendor', 'tower.vendor.js'),
new webpack.DefinePlugin({ $ENV: JSON.stringify(awx_env) })
],
module: {
preLoaders: [{
@@ -65,8 +77,7 @@ var dev = {
emitErrors: true
}
}],
loaders: [
{
loaders: [{
// disable AMD loading (broken in this lib) and default to CommonJS (not broken)
test: /\.angular-tz-extensions.js$/,
loader: 'imports?define=>false'
@@ -118,8 +129,7 @@ var release = {
})
],
module: {
loaders: [
{
loaders: [{
// disable AMD loading (broken in this lib) and default to CommonJS (not broken)
test: /\.angular-tz-extensions.js$/,
loader: 'imports?define=>false!'