-
Notifications
You must be signed in to change notification settings - Fork 0
/
angular-cli-build.js
44 lines (37 loc) · 1.1 KB
/
angular-cli-build.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
'use strict';
const fs = require('fs');
const path = require('path');
// Import the require hook. Enables us to require TS files natively.
require('ts-node/register');
const Angular2App = require('angular-cli/lib/broccoli/angular2-app');
const Funnel = require('broccoli-funnel');
const MergeTree = require('broccoli-merge-trees');
const autoPrefixerTree = require('broccoli-autoprefixer');
module.exports = function(defaults) {
var angularAppTree = new Angular2App(defaults, {
sourceDir: 'src/',
sassCompiler: {
includePaths: [
'src/core/style'
]
},
vendorNpmFiles: [
'systemjs/dist/system-polyfills.js',
'systemjs/dist/system.src.js',
'zone.js/dist/*.js',
'es6-shim/es6-shim.js',
'reflect-metadata/*.js',
'rxjs/**/*.js',
'@angular/**/*.js',
'@angular2-material/**/*.js'
]
});
const cssAutoprefixed = autoPrefixerTree(new Funnel(angularAppTree, {
include: [ '**/*.css' ]
}));
return new MergeTree([
new Funnel('src', { include: ['**/*.scss']}),
angularAppTree,
cssAutoprefixed,
], { overwrite: true });
};