-
Notifications
You must be signed in to change notification settings - Fork 0
/
brunch-config.js
119 lines (111 loc) · 3.55 KB
/
brunch-config.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
var config = {
server: {
hostname: '0.0.0.0',
},
conventions: {
assets: /^(app)(\\|\/)(assets)/,
ignored: ['test/**/*.js','app/scss/components/*.scss', 'app/helpers/**/*.js']
},
npm: {
globals: {
'jQuery': 'jquery',
'$': 'jquery'
},
static: [
'node_modules/what-input/what-input.js',
'node_modules/timeago/jquery.timeago.js',
'node_modules/foundation-sites/dist/js/plugins/foundation.core.js',
'node_modules/foundation-sites/dist/js/plugins/foundation.util.mediaQuery.js',
'node_modules/foundation-sites/dist/js/plugins/foundation.dropdownMenu.js',
'node_modules/foundation-sites/dist/js/plugins/foundation.equalizer.js',
'node_modules/foundation-sites/dist/js/plugins/foundation.tabs.js',
'node_modules/foundation-sites/dist/js/plugins/foundation.util.box.js',
'node_modules/foundation-sites/dist/js/plugins/foundation.util.keyboard.js',
'node_modules/foundation-sites/dist/js/plugins/foundation.util.nest.js',
'node_modules/highlightjs/highlight.pack.min.js'
]
},
files: {
javascripts: {
joinTo: {
'assets/js/vendor.js': [/^(?!app)/, '!node_modules/highlightjs/*.js'],
'assets/js/highlight.js': 'node_modules/highlightjs/*.js',
'assets/js/app.js': "app/*.js",
'assets/js/pages/account/account.js': "app/pages/account/account.js"
},
order: {
after: [
'node_modules/what-input/what-input.js',
'node_modules/timeago/jquery.timeago.js',
'node_modules/foundation-sites/dist/js/plugins/*.js'
]
}
},
stylesheets: {
joinTo: {
'assets/css/app.css': [/^(app)/, "!app/scss/highlight.scss", "!app/scss/amp.scss"],
'assets/css/highlight.css': "app/scss/highlight.scss",
'assets/css/amp.css': "app/scss/amp.scss"
}
}
},
plugins: {
babel: {
presets: ['es2015']
},
sass: {
options: {
includePaths: [
'node_modules/foundation-sites/scss',
'node_modules/motion-ui/src',
'node_modules/normalize-scss/sass',
'node_modules/sassy-lists/stylesheets'
]
}
},
postcss: {
processors: [
require('autoprefixer')(['last 8 versions','ie >= 9'])
]
},
beforeBrunch: [
'cp environments/debug/config.development.js app/config.js',
'cp environments/debug/google-analytics.js app/google-analytics.js'
],
afterBrunch: [
'gulp'
]
},
overrides: {
production: {
plugins: {
beforeBrunch: [
'cp environments/release/config.production.js app/config.js',
'cp environments/release/google-analytics.js app/google-analytics.js'
],
afterBrunch: [
'gulp --production'
]
}
}
}
};
// GAMES
var temppath;
var fs = require('fs');
var yaml = require('js-yaml');
var games = yaml.load(fs.readFileSync('./app/data/games.yml', 'utf8'));
Object.keys(games).forEach(function(key) {
temppath = 'pages/games/' + key + '/reporting.js';
config.files.javascripts.joinTo['assets/js/' + temppath] = 'app/' + temppath;
});
// LEARNING ABCs
['pages/learn/abc/utils.js', 'pages/learn/abc/preview.js'].forEach(function(path) {
config.files.javascripts.joinTo['assets/js/' + path] = 'app/' + path;
});
var abc = yaml.load(fs.readFileSync('./app/data/abc.yml', 'utf8'));
Object.keys(abc).forEach(function(letter) {
temppath = 'pages/learn/abc/' + letter + '.js';
config.files.javascripts.joinTo['assets/js/' + temppath] = 'app/' + temppath;
});
module.exports = config;