UI Build System - new interface

Use `make ui-devel` to build a development/debug version of the  UI, with source maps,
without raising any additional browser-sync or filesystem polling.
This commit is contained in:
Leigh Johnson
2016-10-26 16:51:39 -04:00
parent 04a094aa7c
commit 2c8d295132
4 changed files with 23 additions and 5 deletions

View File

@@ -21,12 +21,21 @@ module.exports = function(grunt) {
// 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',
'browserSync:http',
'concurrent:watch'
]);
grunt.registerTask('devNoSync', [
'clean:tmp',
'clean:static',
'concurrent:devNoSync',
]);
grunt.registerTask('release', [

View File

@@ -2,6 +2,10 @@ module.exports = {
dev: {
tasks: ['copy:vendor', 'copy:assets', 'copy:partials', 'copy:languages', 'copy:config', 'less:dev'],
},
// This concurrent target is intended for development ui builds that do not require raising browser-sync or filesystem polling
devNoSync: {
tasks: ['copy:vendor', 'copy:assets', 'copy:partials', 'copy:languages', 'copy:config', 'less:dev', 'webpack:dev'],
},
prod: {
tasks: ['newer:copy:vendor', 'newer:copy:assets', 'newer:copy:partials', 'newer:copy:languages', 'newer:copy:config', 'newer:less:prod']
},

View File

@@ -16,8 +16,9 @@
"npm": "^3.10.3"
},
"scripts": {
"build-docker-machine": "ip=$(docker-machine ip $DOCKER_MACHINE_NAME); npm set ansible-tower:django_host ${ip}; grunt dev",
"build-docker-cid": "ip=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' $DOCkER_CID` | npm set config ansible-tower:django_host ${ip}; grunt dev",
"build-docker-machine": "grunt dev; ip=$(docker-machine ip $DOCKER_MACHINE_NAME); npm set ansible-tower:django_host ${ip}; grunt sync",
"build-docker-cid": "grunt dev; ip=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' $DOCkER_CID` | npm set config ansible-tower:django_host ${ip}; grunt sync",
"build-devel": "grunt devNoSync",
"pot": "grunt nggettext_extract",
"languages": "grunt nggettext_compile",
"build-release": "grunt release",