-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgulpfile.js
More file actions
62 lines (58 loc) · 1.55 KB
/
gulpfile.js
File metadata and controls
62 lines (58 loc) · 1.55 KB
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
var elixir = require('laravel-elixir'),
path = require('path'),
gulp = require('gulp'),
webpack = require('webpack'),
shell = require('gulp-shell');
require('laravel-elixir-webpack');
/*
|--------------------------------------------------------------------------
| Elixir Asset Management
|--------------------------------------------------------------------------
|
| Elixir provides a clean, fluent API for defining some basic Gulp tasks
| for your Laravel application. By default, we are compiling the Sass
| file for our application, as well as publishing vendor resources.
|
*/
var PATHS = {
app: path.join(__dirname, 'resources/assets/js'),
build: path.join(__dirname, 'build')
};
elixir.config.js.browserify.watchify = {
enabled: true,
options: {
poll: true
}
}
elixir(function(mix) {
mix.phpUnit()
.sass('app.scss')
.browserSync({
proxy: 'processlab.dev'
})
.scripts([
'../bower/jquery/dist/jquery.js',
'../bower/bootstrap-sass/assets/javascripts/bootstrap.min.js'
], 'public/js/vendor.js')
.webpack('index.jsx', {
outputDir: 'public/js',
entry: PATHS.app + '/index.jsx',
output: {
filename: 'components.js'
},
module: {
loaders: [
{
test: /\.jsx?$/,
loaders: ['babel?cacheDirectory,presets[]=react,presets[]=es2015'],
include: PATHS.app
}
]
},
plugins: [
new webpack.ProvidePlugin({
'fetch': 'imports?this=>global!exports?global.fetch!whatwg-fetch'
})
]
});
});