mirror of
https://github.com/ansible/awx.git
synced 2026-05-20 15:27:47 -02:30
Use broccoli to build tests
This commit is contained in:
18
Brocfile.js
18
Brocfile.js
@@ -20,6 +20,7 @@ var args = parseArgs(allArgs['--']);
|
||||
var shouldCompress = isUndefined(args.compress) ? false : args.compress;
|
||||
var debugMode = isUndefined(args.debug) ? false : args.debug;
|
||||
var silentMode = isUndefined(args.silent) ? false : args.silent;
|
||||
var includeTests = isUndefined(args.tests) ? true : args.tests;
|
||||
|
||||
var appName = 'tower';
|
||||
|
||||
@@ -67,6 +68,11 @@ var vendorFiles =
|
||||
'ansible/*.js'
|
||||
];
|
||||
|
||||
var testFiles =
|
||||
[ 'tests/helpers.js',
|
||||
'tests/unit/**/*.js'
|
||||
];
|
||||
|
||||
function log() {
|
||||
var msgs = Array.prototype.slice.apply(arguments);
|
||||
|
||||
@@ -133,6 +139,18 @@ var styles = compileLess(appStyles, 'less/ansible-ui.less', 'tower.min.css');
|
||||
|
||||
app = mergeTrees([app, styles]);
|
||||
|
||||
if (includeTests) {
|
||||
var tests = new Funnel('awx/ui',
|
||||
{ include: ['tests/unit/**/*.js']
|
||||
|
||||
});
|
||||
|
||||
tests = doDebug('tests-funnel', tests);
|
||||
tests = new ES6(tests);
|
||||
app = mergeTrees([app, tests]);
|
||||
app = doDebug('merge-tests', app);
|
||||
}
|
||||
|
||||
if (shouldCompress) {
|
||||
app = uglifyFiles(app);
|
||||
app = gzip(app,
|
||||
|
||||
Reference in New Issue
Block a user