replaced Grunt with Webpack as front-end build tool

This commit is contained in:
alecmerdler 2017-05-21 02:10:11 -07:00
parent 36ddba24ad
commit 2e133d2b9c
16 changed files with 222 additions and 481 deletions

View file

@ -4,6 +4,15 @@ import { QuayModule } from './quay.module';
import { provideRun } from './quay-run';
import * as angular from 'angular';
// Load all JS/CSS files into bundle: http://stackoverflow.com/a/30652110
declare var require: any;
function requireAll(r) {
r.keys().forEach(r);
}
// Use Webpack script-loader to eval in global scope: https://webpack.js.org/loaders/script-loader/
requireAll(require.context('script-loader!../lib', true, /\.js$/));
requireAll(require.context('../lib', true, /\.css$/));
/**
* Register ng-metadata module as a traditional AngularJS module on the global namespace for non-TypeScript components.
@ -13,3 +22,11 @@ import * as angular from 'angular';
const ng1QuayModule: string = bundle(QuayModule, []).name;
angular.module('quay', [ng1QuayModule])
.run(provideRun);
// Load JS/CSS/HTML dependent on above AngularJS module
requireAll(require.context('.', true, /\.js$/));
requireAll(require.context('../css', true, /\.css$/));
requireAll(require.context('../partials', true, /\.html/));
requireAll(require.context('../directives', true, /\.html/));
requireAll(require.context('.', true, /\.html/));