2015-12-13 04:42:28 +00:00
|
|
|
require('events').EventEmitter.defaultMaxListeners = 30;
|
|
|
|
|
2016-06-25 09:09:27 +00:00
|
|
|
var cssnext = require('postcss-cssnext');
|
2015-12-13 04:42:28 +00:00
|
|
|
var elixir = require('laravel-elixir');
|
2016-01-08 06:47:27 +00:00
|
|
|
var gutils = require('gulp-util');
|
|
|
|
|
2016-06-25 09:09:27 +00:00
|
|
|
elixir.config.js.browserify.transformers.push({
|
2016-07-08 04:42:46 +00:00
|
|
|
name: 'vueify',
|
2016-06-25 09:09:27 +00:00
|
|
|
|
2016-07-08 04:42:46 +00:00
|
|
|
options: {
|
|
|
|
postcss: [cssnext()]
|
|
|
|
}
|
2016-06-25 09:09:27 +00:00
|
|
|
});
|
2015-12-13 04:42:28 +00:00
|
|
|
|
2016-01-08 06:47:27 +00:00
|
|
|
if (gutils.env._.indexOf('watch') > -1) {
|
2016-07-08 04:42:46 +00:00
|
|
|
elixir.config.js.browserify.plugins.push({
|
|
|
|
name: "browserify-hmr",
|
|
|
|
options : {}
|
|
|
|
});
|
2016-01-08 06:47:27 +00:00
|
|
|
}
|
|
|
|
|
2015-12-13 04:42:28 +00:00
|
|
|
elixir(function (mix) {
|
2016-07-08 04:42:46 +00:00
|
|
|
mix.browserify('main.js');
|
|
|
|
mix.sass('app.scss');
|
|
|
|
|
|
|
|
mix.copy('resources/assets/img', 'public/img')
|
|
|
|
.copy('node_modules/font-awesome/fonts', 'public/build/fonts')
|
|
|
|
.copy('resources/assets/fonts', 'public/build/fonts');
|
|
|
|
|
|
|
|
mix.scripts([
|
|
|
|
'node_modules/babel-polyfill/dist/polyfill.min.js',
|
|
|
|
'node_modules/plyr/dist/plyr.js',
|
|
|
|
'node_modules/rangetouch/dist/rangetouch.js',
|
|
|
|
'resources/assets/js/libs/modernizr-custom.js'
|
|
|
|
], 'public/js/vendors.js', './')
|
|
|
|
.styles([
|
|
|
|
'resources/assets/css/**/*.css',
|
|
|
|
'node_modules/font-awesome/css/font-awesome.min.css',
|
2016-08-11 02:55:54 +00:00
|
|
|
'node_modules/rangeslider.js/dist/rangeslider.css',
|
|
|
|
'node_modules/sweetalert/dist/sweetalert.css'
|
2016-07-08 04:42:46 +00:00
|
|
|
], 'public/css/vendors.css', './');
|
|
|
|
|
|
|
|
mix.version(['css/vendors.css', 'css/app.css', 'js/vendors.js', 'js/main.js']);
|
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') {
|
|
|
|
mix.browserSync({
|
|
|
|
proxy: 'koel.dev',
|
|
|
|
files: [
|
|
|
|
elixir.config.get('public.css.outputFolder') + '/**/*.css',
|
|
|
|
elixir.config.get('public.versioning.buildFolder') + '/rev-manifest.json',
|
|
|
|
]
|
|
|
|
});
|
|
|
|
}
|
2015-12-13 04:42:28 +00:00
|
|
|
});
|