2015-07-08 03:34:58 -04:00
|
|
|
process.env.DISABLE_NOTIFIER = true;
|
|
|
|
|
2016-01-26 23:20:08 -05:00
|
|
|
var gulp = require('gulp'),
|
2015-11-30 23:40:49 -05:00
|
|
|
elixir = require('laravel-elixir'),
|
|
|
|
lessglob = require('less-plugin-glob');
|
2015-07-08 03:34:58 -04:00
|
|
|
|
|
|
|
// autoprefixer settings
|
2015-11-30 23:40:49 -05:00
|
|
|
elixir.config.autoprefix = {
|
|
|
|
remove: false,
|
|
|
|
cascade: false,
|
2016-01-26 23:20:08 -05:00
|
|
|
browsers: [ 'last 2 versions' ]
|
2015-11-30 23:40:49 -05:00
|
|
|
};
|
2015-07-08 03:34:58 -04:00
|
|
|
|
2016-01-26 23:20:08 -05:00
|
|
|
// javascript files for the dashboard in resources/assets/js/
|
|
|
|
var jsDashboard = [
|
|
|
|
'dashboard.js'
|
|
|
|
];
|
|
|
|
|
|
|
|
// javascript files for the public site in resources/assets/js/
|
2015-07-08 03:34:58 -04:00
|
|
|
var jsLocal = [
|
2015-09-30 00:17:09 -04:00
|
|
|
'site-vars.js',
|
2016-01-03 19:08:53 -05:00
|
|
|
'contact.js',
|
2016-01-26 23:20:08 -05:00
|
|
|
'subscription.js',
|
2015-07-08 03:34:58 -04:00
|
|
|
'app.js'
|
|
|
|
];
|
|
|
|
|
2016-01-26 23:20:08 -05:00
|
|
|
// javascript files in bower_components/ for libraries
|
2015-07-08 03:34:58 -04:00
|
|
|
var jsBower = [
|
|
|
|
'jquery/dist/jquery.min.js',
|
2016-01-26 23:20:08 -05:00
|
|
|
'bootstrap/dist/js/bootstrap.min.js',
|
2016-01-28 22:28:05 -05:00
|
|
|
'jQuery.stickyFooter/assets/js/jquery.stickyfooter.js'
|
2015-07-08 03:34:58 -04:00
|
|
|
];
|
|
|
|
|
2016-01-26 23:20:08 -05:00
|
|
|
var jsDashboardBower = [
|
|
|
|
'Sortable/Sortable.js',
|
|
|
|
'datetimepicker/jquery.datetimepicker.js',
|
|
|
|
'simplemde/dist/simplemde.min.js'
|
2015-07-08 03:34:58 -04:00
|
|
|
];
|
|
|
|
|
2016-01-26 23:20:08 -05:00
|
|
|
// less import path locations other than resources/assets/less/
|
|
|
|
var lessPaths = [ 'bower_components' ];
|
|
|
|
|
2015-07-08 03:34:58 -04:00
|
|
|
elixir(function(mix) {
|
2016-01-26 23:20:08 -05:00
|
|
|
// compile the project
|
|
|
|
mix
|
|
|
|
.copy('bower_components/bootstrap/dist/fonts/**', 'public/fonts')
|
|
|
|
.copy('bower_components/font-awesome/fonts/**', 'public/fonts')
|
2016-03-07 21:46:36 -05:00
|
|
|
.less('dashboard.less', 'public/css/dashboard.css', { paths: lessPaths, plugins: [lessglob] })
|
|
|
|
.less('app.less', 'public/css/app.css', { paths: lessPaths, plugins: [lessglob] })
|
2016-01-26 23:20:08 -05:00
|
|
|
.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/')
|
2016-03-07 22:17:38 -05:00
|
|
|
.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']);
|
2016-03-07 21:46:36 -05:00
|
|
|
|
2016-03-07 22:17:38 -05:00
|
|
|
if (!elixir.config.production) {
|
2016-03-07 21:46:36 -05:00
|
|
|
// start livereload when not production
|
|
|
|
require('laravel-elixir-livereload');
|
2015-07-08 03:34:58 -04:00
|
|
|
mix.livereload();
|
2016-03-07 21:46:36 -05:00
|
|
|
}
|
2015-07-08 03:34:58 -04:00
|
|
|
});
|