/
gulpfile.sample.js
executable file
·60 lines (52 loc) · 1.56 KB
/
gulpfile.sample.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
'use strict';
/**
* The assets directory contains all of the source (development) asset files.
* Leave empty or undefined to use the default Laravel directory structure.
*/
const assetsDir = '';
/**
* The public directory contains all of the distribution (release) asset files.
* Leave empty or undefined to use the default Laravel directory structure.
*/
const publicDir = '';
const gulp = require('gulp');
const assets = require('loewy-assets');
/**
* Use of deep-extend is not required, but very helpful. See below.
*/
const deepExtend = require('deep-extend');
/**
* Assets setup callback function
*/
function init () {
/**
* Use deep-extend to extend the configuration object.
*/
deepExtend(this.config, {
/**
* See config.js for the full configuration object. You may override any of the configuration
* options simply by placing them here. You may override one or more options without having
* to override all of them.
*/
});
/**
* Advanced usage:
*
* this refers to the assets object from the loewy-assets module. This means that you have full access
* to the list of tasks, list of watchers, and any other internals of the module. Here are some examples:
*
* // create a new task
* this.tasks.myTask = function() {
* gulp.task('my-task', function() { ... });
* };
*
* // remove one of the default tasks (prevent it from initializing or running at all)
* delete this.tasks.sass;
*
* See the index.js file for advanced usage details.
*/
}
/**
* Set up the asset pipeline.
*/
assets(assetsDir, publicDir, init, gulp);