Refactor UI Build System (#3203)

* initial build trial, clean up awx/ui

* fix hardcoded refs to ng-toast, add jshint preloader

* remove browserify test

* update grunt-jshint -> jshint module loader, browser-sync, update dev targets to build-docker-machine & build-docker-cid, fix blocking tasks

* less autoprefixer

* sample build commands

* fix release build

* update README

* karma config stub

* webpack config for karma tests

* karma preview for shane

* fix build-docker-machine target

* karma+webpack test pipeline configuration, stub tests

* fix smart/job status icons classes

* fix jquery + jsyaml shims, fix LESS cascade

* fix angular-codemirror dependency, explicitly import style/mode dependencies

* shim jsonlint

* fix angular-scheduler AMD imports, remove jquuery-ui shim, fix release config

* use closed $.fn.datepicker for system-tracking

* remove packaging/node/

* remove old tests

* shrinkwrap fragile dependency sandcastle, update README, lint

* first pass at fixing rrule shim

* update makefile targets

* update gitignore w/ new flag file

* add saucelabs karma config

* add license controller test

* add examples of service and directive tests

* Makefile flubs

* consolidate clean-ui target, compulsively update flag file location

* dep on CJS/AMD/UMD compatible version of rrule lib, fix example tests/config for demo

* boilerplate karma config for saucelabs (should be abstracted to common config after proven to work)

* update docs

* docs feedback

* update Dockerfile with Node 6.x dep
This commit is contained in:
Leigh Johnson
2016-08-17 16:09:54 -04:00
committed by GitHub
parent d51edff8a8
commit ce61fe4a42
3676 changed files with 6254 additions and 663860 deletions

View File

@@ -0,0 +1,20 @@
var django_port = process.env.npm_package_config_django_port,
django_host = process.env.npm_package_config_django_host;
module.exports = {
http: {
bsFiles: {
src: [
'static/**/*'
]
},
options: {
proxy: {
target: `${django_host}:${django_port}`,
ws: true
},
keepalive: false,
watchTask: true
}
}
};

View File

@@ -0,0 +1,4 @@
module.exports = {
static: 'static/*',
coverage: 'coverage/*'
};

View File

View File

@@ -0,0 +1,14 @@
module.exports = {
dev: {
tasks: ['copy:vendor', 'copy:assets', 'copy:partials', 'copy:config', 'less:dev'],
},
prod: {
tasks: ['newer:copy:vendor', 'newer:copy:assets', 'newer:copy:partials', 'newer:copy:config', 'newer:less:prod']
},
watch: {
tasks: ['watch:css', 'watch:partials', 'watch:assets', ['webpack:dev', 'watch:config']],
options: {
logConcurrentOutput: true
}
}
};

View File

@@ -0,0 +1,49 @@
var staticFiles = ['angular-tz-extensions/tz/data/*',
'angular-scheduler/lib/angular-scheduler-detail.html',
'angular-scheduler/lib/angular-scheduler.html',
'nvd3/build/nv.d3.css',
'ng-toast/dist/ngToast.min.css',
'codemirror/addon/lint/lint.css',
'codemirror/theme/elegant.css',
'codemirror/lib/codemirror.css',
'select2/dist/css/select2.css',
'components-font-awesome/css/font-awesome.min.css',
'components-font-awesome/fonts/fontawesome-webfont.ttf',
'components-font-awesome/fonts/fontawesome-webfont.woff',
'components-font-awesome/fonts/fontawesome-webfont.woff2'
];
module.exports = {
assets: {
files: [{
cwd: 'client/',
expand: true,
src: 'assets/**/*',
dest: 'static/'
}]
},
vendor: {
files: [{
expand: true,
cwd: 'node_modules/',
src: staticFiles,
dest: 'static/lib/'
}]
},
partials: {
files: [{
cwd: 'client/src',
expand: true,
src: ['**/*.partial.html'],
dest: 'static/partials'
}, {
cwd: 'client/src/partials',
expand: true,
src: ['*.html'],
dest: 'static/partials/'
}]
},
config: {
files: { 'static/config.js': ['client/src/config.js'] }
}
};

View File

@@ -0,0 +1,29 @@
module.exports = {
options: {
options : {
plugins : [ new (require('less-plugin-autoprefix'))({browsers : [ "last 2 versions" ]}) ]
}
},
dev: {
files: [{
dest: 'static/tower.min.css',
src: [
'client/legacy-styles/*.less',
'client/src/**/*.less',
]
}]
},
prod: {
files: {
'static/tower.min.css': [
'client/legacy-styles/*.less',
'client/src/**/*.less',
]
},
options: {
compress: true,
}
}
};

View File

@@ -0,0 +1,18 @@
module.exports = {
css: {
files: 'client/**/*.less',
tasks: ['newer:less:dev']
},
partials: {
files: 'client/src/**/*.html',
tasks: ['newer:copy:partials']
},
assets: {
files: 'client/assets',
tasks: ['newer:copy:assets']
},
config: {
files: 'client/src/config.js',
tasks: ['newer:copy:config']
}
};

View File

@@ -0,0 +1,5 @@
var config = require('../webpack.config.js');
module.exports = {
dev: config.dev,
prod: config.release
};