forked from pure-css/pure-site
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Brocfile.js
43 lines (34 loc) · 1.26 KB
/
Brocfile.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
'use strict';
var mergeTrees = require('broccoli-merge-trees'),
unwatchedTree = require('broccoli-unwatched-tree'),
compileModules = require('./lib/compile-modules'),
graphModules = require('./lib/graph'),
cssWithMQs = require('./lib/css-with-mqs'),
stripMQs = require('./lib/css-strip-mqs'),
mapFiles = require('./lib/map-files');
var bower_components = unwatchedTree('bower_components/'),
node_modules = unwatchedTree('node_modules/');
var vendor = mergeTrees([
mapFiles(bower_components, {
'rainbow/js/': 'vendor/rainbow/'
}),
mapFiles(node_modules, {
'css-mediaquery/index.js' : 'vendor/css-mediaquery.js',
'handlebars/dist/handlebars.runtime.js': 'vendor/handlebars.runtime.js'
})
]);
var pub = 'public/';
// Calculate the ES6 module dependency graph.
var modGraph = graphModules(pub, {
basePath : 'js/',
resolveImports: true
});
// Compile ES6 Modules in `pub`.
pub = compileModules(pub, {
basePath: 'js/',
type : 'yui'
});
// Strip Media Queries from CSS files and save copy as "-old-ie.css".
var oldIECSS = stripMQs(cssWithMQs(pub), {suffix: '-old-ie'});
// Export merged trees.
module.exports = mergeTrees([vendor, pub, oldIECSS, modGraph]);