-
Notifications
You must be signed in to change notification settings - Fork 11
/
elixirConfig.js
executable file
·378 lines (321 loc) · 11.6 KB
/
elixirConfig.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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
/*
|----------------------------------------------------------------
| Master Configuration
|----------------------------------------------------------------
|
| This file contains the proper paths and options for each and
| and every Gulp task that Elixir wraps up.
*/
var config = {
/*
|----------------------------------------------------------------
| Production Mode
|----------------------------------------------------------------
|
| Elixir will trigger certain actions, dependent upon this flag.
| You may enable this mode by triggering "gulp --production",
| enabling things like CSS and JS minification. EasyPeasy!
|
*/
production: Elixir.inProduction,
/*
|----------------------------------------------------------------
| Assets Path
|----------------------------------------------------------------
|
| This assets path property is prefixed to all relevant assets
| in your application. For example, "resources/assets/sass"
| or "resources/assets/coffee." Change this if you must.
|
*/
assetsPath: 'resources/assets',
/*
|----------------------------------------------------------------
| Public Path
|----------------------------------------------------------------
|
| Much like assets path, this public path property is prefixed to
| any paths in your application, that point to the public dir.
| It's useful, when a server requires a unique public path.
|
*/
publicPath: 'public',
/*
|----------------------------------------------------------------
| App Path
|----------------------------------------------------------------
|
| The app path, you guessed it, specifies the path to the app
| folder in your project.
|
*/
appPath: 'app',
/*
|----------------------------------------------------------------
| View Path
|----------------------------------------------------------------
|
| Very likely, you will never need/want to modify this property.
| However, for the instances where your app's views directory
| is located in a different spot, please modify as needed.
|
*/
viewPath: 'resources/views',
/*
|----------------------------------------------------------------
| Notifications
|----------------------------------------------------------------
|
| As a convenience, Elixir will, when available, automatically
| display OS notifications upon the completion of any task.
| But of course you're free to disable this, if needed.
|
*/
notifications: true,
/*
|----------------------------------------------------------------
| Log Muted
|----------------------------------------------------------------
|
| As a convenience, Elixir will, when available, automatically
| display OS log upon the completion of any task.
| But of course you're free to disable this, if needed.
|
*/
muted: false,
/*
|----------------------------------------------------------------
| Sourcemaps
|----------------------------------------------------------------
|
| A sourcemap is a JSON mapping, which declares a relationship
| between a minified file and its original source location.
| Quite useful for debugging, it's turned on by default.
|
*/
sourcemaps: !Elixir.inProduction,
/*
|----------------------------------------------------------------
| File System Event Batching
|----------------------------------------------------------------
|
| You likely won't need to modify this object. That said, should
| you need to, these settings are exclusive to the watch task.
| They set the limit and timeout for running batch-updates.
|
*/
batchOptions: {
// https://github.com/floatdrop/gulp-batch#batchoptions-callback-errorhandler
limit: undefined,
timeout: 1000
},
css: {
/*
|----------------------------------------------------------------
| CSS Source Folder
|----------------------------------------------------------------
|
| This property declares the root folder for all vanilla CSS
| files. Note that this is the folder name, not the path.
| We'll stick with a general "css" name - makes sense.
|
*/
folder: 'css',
/*
|----------------------------------------------------------------
| CSS Output Folder
|----------------------------------------------------------------
|
| Generally, your source files will be stored outside of your
| public directory, and then compiled/merged as necessary.
| This property represents the public specific folder.
|
*/
outputFolder: 'css',
/*
|----------------------------------------------------------------
| CSS3 Autoprefixing
|----------------------------------------------------------------
|
| When working with any form of CSS, Elixir automatically runs
| your file through a CSS autoprefixer, which automatically
| adds or removes vendor-specific CSS3 prefixes. Useful!
|
*/
autoprefix: {
enabled: true,
// https://www.npmjs.com/package/gulp-autoprefixer#api
options: {
browsers: ['> 1%'],
cascade: false
}
},
/*
|----------------------------------------------------------------
| CSS3 Minification
|----------------------------------------------------------------
|
| When running Gulp with the production flag, any CSS will
| automatically be minified. This offers the benefit of
| reduced file sizes. Adjust any plugin option here.
|
*/
minifier: {
// https://github.com/jakubpawlowicz/clean-css#how-to-use-clean-css-api
pluginOptions: {}
},
/*
|----------------------------------------------------------------
| Sass Compilation
|----------------------------------------------------------------
|
| Gone are the days of researching how to call Sass on a given
| folder. Simply run `mix.sass('file.scss')` and you're all
| set. This object sets the folder name and plugin opts.
|
*/
sass: {
folder: 'sass',
search: '/**/*.+(sass|scss)',
// https://github.com/sass/node-sass#options
pluginOptions: {
outputStyle: Elixir.inProduction ? 'compressed' : 'nested',
precision: 10
}
},
/*
|----------------------------------------------------------------
| Less Compilation
|----------------------------------------------------------------
|
| Gone are the days of researching how to call Less on a given
| folder. Simply run `mix.less('file.less')` and you're all
| set. This object sets the folder name and plugin opts.
|
*/
less: {
folder: 'less',
search: '/**/*.less',
// https://github.com/plus3network/gulp-less#options
pluginOptions: {}
}
},
js: {
/*
|----------------------------------------------------------------
| JavaScript Source Folder
|----------------------------------------------------------------
|
| Much like the CSS folder option above, this property sets the
| name of the folder, not the full path, for your JavaScript
| source files. It then gets affixed to the "assetsPath".
|
*/
folder: 'js',
/*
|----------------------------------------------------------------
| JavaScript Output Folder
|----------------------------------------------------------------
|
| Once your vanilla JavaScript files have been compiled/merged,
| they will be saved to your public directory. This property
| represents the name of the folder within that location.
|
*/
outputFolder: 'js',
/*
|----------------------------------------------------------------
| UglifyJS Parser/Compressor/Beautifier
|----------------------------------------------------------------
|
| UglifyJS is a JavaScript parser/compressor/beautifier.
| It'll minify your JavaScript with ease and has an option to
| mangle your code.
|
*/
uglify: {
options: {
compress: {
drop_console: true
}
}
},
/*
|----------------------------------------------------------------
| Rollup
|----------------------------------------------------------------
|
| Rollup is a JavaScript module bundler. It allows you to write
| your application or library as a set of modules – using modern
| ES2015 import/export syntax – and bundle them up into a single
| file
|
| @see {@link http://rollupjs.org/}
|
*/
rollup: {
moduleName: 'QuorraElixirBundle'
},
/*
|----------------------------------------------------------------
| Webpack
|----------------------------------------------------------------
|
| webpack is a module bundler. webpack takes modules with
| dependencies and generates static assets representing those
| modules
|
| @see {@link http://webpack.github.io/}
|
*/
webpack: {
}
},
testing: {
/*
|----------------------------------------------------------------
| Mocha Autotesting
|----------------------------------------------------------------
|
| Want to automatically trigger your mocha tests. Not a problem.
| This object stores mocha test command with options. For a
| custom command, you may use the second arg to mix.mocha.
|
*/
mocha: {
path: 'tests', // for watching
search: '/**/*.js', // for watching
command: 'mocha --opts app/tests/mocha.opts'
}
},
/*
|----------------------------------------------------------------
| File Versioning
|----------------------------------------------------------------
|
| If you use aggressive assets caching on your server, then you
| will need a way to cachebust, right? No querystring needed
| this time. Here you may set the default "build" folder.
|
*/
versioning: {
buildFolder: 'build'
},
/*
|----------------------------------------------------------------
| Browsersync
|----------------------------------------------------------------
|
| Want to have your browser refresh instantly upon changing a bit
| of Sass or modifying a view? With Elixir, it has never been
| easier. This contains default options for the extension.
|
*/
browserSync: {
// http://www.browsersync.io/docs/options/
proxy: 'localhost:3000',
reloadOnRestart: true,
notify: true
}
};
module.exports = config;