mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-11-22 07:54:11 -05:00
Only run the version task on production and organize the gulpfile a bit better
This commit is contained in:
parent
e970fecf8e
commit
1104798a3d
1 changed files with 10 additions and 16 deletions
24
gulpfile.js
24
gulpfile.js
|
@ -4,10 +4,6 @@ var gulp = require('gulp'),
|
|||
elixir = require('laravel-elixir'),
|
||||
lessglob = require('less-plugin-glob');
|
||||
|
||||
// require livereload when not production
|
||||
if (!elixir.config.production)
|
||||
require('laravel-elixir-livereload');
|
||||
|
||||
// autoprefixer settings
|
||||
elixir.config.autoprefix = {
|
||||
remove: false,
|
||||
|
@ -49,21 +45,19 @@ elixir(function(mix) {
|
|||
mix
|
||||
.copy('bower_components/bootstrap/dist/fonts/**', 'public/fonts')
|
||||
.copy('bower_components/font-awesome/fonts/**', 'public/fonts')
|
||||
.less('dashboard.less', 'public/css/dashboard.css', {
|
||||
paths: lessPaths,
|
||||
plugins: [ lessglob ]
|
||||
})
|
||||
.less('app.less', 'public/css/app.css', {
|
||||
paths: lessPaths,
|
||||
plugins: [ lessglob ]
|
||||
})
|
||||
.less('dashboard.less', 'public/css/dashboard.css', { paths: lessPaths, plugins: [lessglob] })
|
||||
.less('app.less', 'public/css/app.css', { paths: lessPaths, plugins: [lessglob] })
|
||||
.scripts(jsLocal, 'public/js/app.js', 'resources/assets/js/')
|
||||
.scripts(jsDashboard, 'public/js/dashboard.js', 'resources/assets/js/')
|
||||
.scripts(jsBower, 'public/js/lib.js', 'bower_components/')
|
||||
.scripts(jsDashboardBower, 'public/js/lib-dashboard.js', 'bower_components/')
|
||||
.version([ 'css/dashboard.css', 'css/app.css', 'js/dashboard.js', 'js/app.js', 'js/lib.js', 'js/lib-dashboard.js' ]);
|
||||
.scripts(jsDashboardBower, 'public/js/lib-dashboard.js', 'bower_components/');
|
||||
|
||||
if (elixir.config.production) {
|
||||
// run the version function on production
|
||||
mix.version(['css/dashboard.css', 'css/app.css', 'js/dashboard.js', 'js/app.js', 'js/lib.js', 'js/lib-dashboard.js']);
|
||||
} else {
|
||||
// start livereload when not production
|
||||
if (!elixir.config.production)
|
||||
require('laravel-elixir-livereload');
|
||||
mix.livereload();
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue