-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
35 lines (28 loc) · 976 Bytes
/
gulpfile.js
File metadata and controls
35 lines (28 loc) · 976 Bytes
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
/*
gulp配置文件
*/
const elixir = require('laravel-elixir');
const path = require('path');
const webpackStream = require('webpack-stream');
elixir.config.assetsPath = 'resources';
elixir.config.browserlist = {
browsers: [ '> 1%', 'last 2 versions', 'Firefox >= 20', 'Opera 12.1', 'IE >= 9']
};
elixir(function (mix) {
/*
|--------------------------------------------------------------------------
| Build JS files
|--------------------------------------------------------------------------
*/
mix.task('run-webpack');
/*
|--------------------------------------------------------------------------
| Copy fonts and other files
|--------------------------------------------------------------------------
*/
});
gulp.task('run-webpack', function(callback) {
return gulp.src('./resources/client-entry.js')
.pipe(webpackStream(require('./webpack.config.js')))
.pipe(gulp.dest('./public/js'));
});