Files
awx/awx/ui/Gruntfile.js
Leigh Johnson 0d3eb67bd0 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
2016-11-09 12:49:18 -05:00

50 lines
1.1 KiB
JavaScript

module.exports = function(grunt) {
// Load grunt tasks & configurations automatically from dir grunt/
require('load-grunt-tasks')(grunt);
// display task timings
require('time-grunt')(grunt);
var options = {
config: {
src: './grunt-tasks/*.js'
},
pkg: grunt.file.readJSON('package.json')
};
var configs = require('load-grunt-configs')(grunt, options);
// Project configuration.
grunt.initConfig(configs);
grunt.loadNpmTasks('grunt-newer');
grunt.loadNpmTasks('grunt-angular-gettext');
// writes environment variables for development. current manages:
// browser-sync + websocket proxy
grunt.registerTask('sync', [
'browserSync:http',
'concurrent:watch'
]);
grunt.registerTask('dev', [
'clean:tmp',
'clean:static',
'concurrent:dev',
'sync',
]);
grunt.registerTask('devNoSync', [
'clean:tmp',
'clean:static',
'concurrent:devNoSync',
]);
grunt.registerTask('release', [
'clean:tmp',
'clean:static',
'webpack:prod',
'concurrent:prod',
]);
};