-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfrs.config.js
318 lines (210 loc) · 7.65 KB
/
frs.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
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
//custom config options
module.exports = function(config, dirs, appData) {
// Useful path helper
let path = require('path');
// Handy comps references
let comps = config.js.comps,
compMain = comps.main;
// Handy Browsersync options reference
let bsOpts = config.browserSync.options;
// Require a module from core
// var extend = require(dirs.rootModules + 'extend');
/********************
JS
*********************/
// Your custom config goes here...
/********************
Lint
*********************/
// Your custom config goes here...
/********************
Styles
*********************/
// Your custom config goes here...
/********************
Sprites
*********************/
// Your custom config goes here...
/********************
Images
*********************/
// Your custom config goes here...
/********************
Fonts
*********************/
// Your custom config goes here...
/********************
Views
*********************/
// Your custom config goes here...
/********************
Custom dirs
*********************/
// Your custom config goes here...
/********************
Browsersync
*********************/
// Your custom config goes here...
/********************
Clean
*********************/
// Your custom config goes here...
// ****************** Examples ******************
/********************
JS
*********************/
// Enable webpack (ES2015 imports)
// compMain.filename = 'app'; // Set entry filename (default extension if does not contain a dot: js) - possible a glob, preferred single to watch separately
// compMain.webpack = ['**/*.{js,jsx}']; // Watched files (remove jsx if not needed)
// config.lint.options.parserOptions = {
// sourceType: 'module',
// ecmaVersion: 5
// }
// Store vendor and app code in separate files
// config.js.concatVendorApp = false;
// Change sourcemaps root
// config.js.sourceMapsRoot = '/src/';
// Enable lint on change
// config.js.inject.lint = true;
// Allow build even if lint errored
// config.js.inject.lintFailAfterError = false;
// Disable Babel
// config.js.inject.babel = false;
// config.lint.options.parserOptions = {
// ecmaVersion: 5
// }
// Main JS: change filename to script.js
// compMain.filename = 'script.js';
// Main JS: add prioritized files
// compMain.priority.vendor = ['carousel.js'];
// compMain.priority.app = ['core.js', 'app/init.js'];
// Add a html5shiv comp (add a dependency in in your bower.json file first)
// comps.html5shiv = {
// bower: ['html5shiv'],
// excludeIn: true,
// watch: false
// }
// Add a comp (full parameters)
// comps.comp_name = {
// filename: 'app', // Set to false to not produce any output file (for sub-comps); if not set, defaults to comp id
// // .js extension added automatically unless the name contains a dot
// // For webpack: enter a filename or glob, e.g. ['app', 'app2'] (.js extension appended automatically if dot not found)
// bower: ['**/*.js'], // Set only name of the package
// vendor: ['**/*.js'], // Path relative to the appropriate directory
// app: ['**/*.js'], // Path relative to the appropriate directory
// webpack: false, // Disabled by default
// // webpack: ['app/**/*.js'], // Example webpack use, disables bower, vendor and app props
// // Set prioritized paths (does not apply for webpack)
// priority: {
// vendor: [],
// app: []
// },
// // Set other comp ids to include (does not apply for webpack)
// dependencies: [],
// // Set comps to exclude all loaded scripts in other comps, e.g.
// // excludeIn: ['comp1', 'comp2'] // Excluded in selected comps
// // excludeIn: true // Excluded in all other comps
// // excludeIn: false // No exclusion
// // Does not apply for webpack
// excludeIn: false,
// watch: true // Not needed, watch blocked only if false
// }
/********************
Lint
*********************/
// For switching to modules (require/import) instead of global packages, see "enable webpack" in JS section
// Add allowed globals
// config.lint.options.globals = {
// angular: false
// }
// Customize rules
// config.lint.options.rules = {
// 'quotes': [2, 'single'],
// 'comma-dangle': [2, 'only-multiline']
// }
/********************
Styles
*********************/
// Change sourcemaps root
// config.styles.sourceMapsRoot = '/src/';
// Enable sourcemaps for prod
// config.styles.prod.sourceMaps = true;
// Change autoprefixer options
// config.styles.autoprefixer.remove = false;
// Change cssnano options
// config.styles.cssnano.safe = false;
// Inject - enable group-css-media-queries plugin (disabled by default as unsafe)
// config.styles.inject.optimizeMediaQueries = true;
/********************
Sprites
*********************/
// Modify default sprites item - example for animations (change Spritesmith algorithm options)
// config.sprites.items[0].options.algorithm = 'left-right';
// config.sprites.items[0].options.algorithmOpts = { sort: false };
// Add a sprites item (directory) - basic options, use @include sprite(dirname-filename) in the SASS stylesheets
// See the source configuration to check all available options
// config.sprites.items.push({ name: 'dirname' });
// config.sprites.items.push({
// name: 'dirname',
// options: {
// // Spritesmith options
// }
// });
/********************
Images
*********************/
// Change imagemin optimization level
// config.images.imagemin.optimizationLevel = 4;
/********************
Fonts
*********************/
// Inject - add a middleware plugin before writing the output
// var myPlugin = require('my-plugin');
// config.fonts.inject.dest = function(stream) {
// return stream.pipe(myPlugin());
// };
/********************
Views
*********************/
// Change htmlmin options
// config.views.htmlmin.collapseWhitespace = false;
// config.views.htmlmin.removeComments = false;
// Disable htmlmin
// config.views.inject.optimize = false;
/********************
Custom dirs
*********************/
// Watch and copy contents of "php" dir from src to dist
/*
config.customDirs.items.push({
name: 'php views', // Optional, displayed in the console during watch
src: dirs.src.main + 'php/**' + '/*.php',
srcDot: false, // Whether to include files starting with a dot
dest: dirs.dist.main + 'php/', // Set to null to just watch the dir without copying (e.g. external backend views)
inject: {
// An object { dirInfo } (with this config) available as this.taskData from within inject functions
src: true, // Function must return: a stream (if canceled) or a glob array passed to the src
limit: true, // gulp-changed plugin
dest: true,
// Watch task, receives undefined and { id, dirInfo } with id and definition as a second parameter
watch: true,
// Clean task, receives current glob to delete (see the clean task injector docs) and { dirInfo } with definition object as a second parameter
clean: false
}
});
*/
/********************
Browsersync
*********************/
// bsOpts.host = 'website.local';
// bsOpts.port = 81;
// Set proxy
// bsOpts.server = false;
// bsOpts.open = 'external';
// bsOpts.proxy = 'proxy.local';
/********************
Clean
*********************/
// Disable images dir cleaning
// config.clean.inject.images = false;
}