-
Notifications
You must be signed in to change notification settings - Fork 0
/
Brocfile.js
63 lines (57 loc) · 2.16 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
var Funnel = require('broccoli-funnel');
var compileLESS = require('broccoli-less');
var cleanCSS = require('broccoli-clean-css');
var uglifyJS = require('broccoli-uglify-js');
var concat = require('broccoli-concat');
var mergeTrees = require('broccoli-merge-trees');
var images = 'src/images';
images = Funnel(images, { destDir: 'images' });
var fonts = 'src/fonts';
fonts = Funnel(fonts, { destDir: 'fonts' });
var vendor_css = Funnel('bower_components', { destDir: 'bower_components', include: ['*.css'] });
var css = mergeTrees(['src/css', vendor_css]);
css = compileLESS(css, { paths: ['src/css'] });
css = cleanCSS(css, {
processImport: true,
processImportFrom: ['!fonts.googleapis.com']
});
css = Funnel(css, { destDir: 'css', exclude: ['bower_components/*'] });
var vendor_js = Funnel('bower_components', { destDir: 'bower_components' });
vendor_js = concat(vendor_js, {
outputFile: 'vendor.js',
headerFiles: [
'bower_components/jquery/dist/jquery.js',
'bower_components/modernizr/modernizr.js',
'bower_components/featherlight/src/featherlight.js',
'bower_components/featherlight/src/featherlight.gallery.js',
'bower_components/jquery-hoverintent/jquery.hoverIntent.js',
'bower_components/superfish/dist/js/superfish.js',
'bower_components/slicknav/jquery.slicknav.js',
'bower_components/isotope/dist/isotope.pkgd.js',
'bower_components/imagesloaded/imagesloaded.pkgd.js',
'bower_components/conditionizr/dist/conditionizr.js',
'bower_components/conditionizr/detects/safari.js',
'bower_components/conditionizr/detects/windows.js',
'bower_components/jquery-infinite-scroll/jquery.infinitescroll.js',
'bower_components/jquery-infinite-scroll/behaviors/manual-trigger.js',
],
inputFiles: [],
allowNone: true,
});
vendor_js = uglifyJS(vendor_js);
var js_src = 'src/js';
js = concat(js_src, {
outputFile: 'script.js',
// header: ";(function() {",
// footer: "})();",
headerFiles: [
'lib/video-thumbs.js',
],
inputFiles: [
'custom-infscroll-auto.js'
],
});
js = uglifyJS(js);
js = mergeTrees([js, js_src, vendor_js]);
js = Funnel(js, { destDir: 'js' });
module.exports = mergeTrees([images, fonts, css, js]);