Skip to content

Instantly share code, notes, and snippets.

@nissicreative
Last active June 16, 2017 19:20
Show Gist options
  • Save nissicreative/35b741149ac391fb0f6fe9f131956d7c to your computer and use it in GitHub Desktop.
Save nissicreative/35b741149ac391fb0f6fe9f131956d7c to your computer and use it in GitHub Desktop.
Laravel Gulp Boilerplate
const elixir = require('laravel-elixir');
elixir(function (mix) {
const bowerPath = './vendor/bower_components';
// Stylesheets
// -------------------------------------------------- //
// Compiles to public/css/app.css
mix.less('app.less', 'public/css', null, {
paths: [
bowerPath + '/bootstrap/less',
bowerPath + '/csstools/less',
]
});
// Compiles to public/css/admin.css
mix.less('admin.less', 'public/css', null, {
paths: [
bowerPath + '/bootstrap/less',
bowerPath + '/csstools/less',
bowerPath + '/eonasdan-bootstrap-datetimepicker/src/less'
]
});
/* Autoversion files */
// mix.version('css/app.css');
// mix.version('css/admin.css');
// Scripts
// -------------------------------------------------- //
// Compiles to public/js/libs.js
mix.scripts([
bowerPath + '/jquery/dist/jquery.js',
bowerPath + '/bootstrap/dist/js/bootstrap.js',
], 'public/js/libs.js')
// Compiles to public/js/plugins.js
mix.scripts([
'ncs.js',
// bowerPath + '/jquery-cycle2/build/jquery.cycle2.js',
], 'public/js/plugins.js');
// Compiles to public/js/main.js
mix.scripts([
'main.js'
], 'public/js/main.js');
// Compiles to public/js/admin.js
mix.scripts([
// bowerPath + '/select2/dist/js/select2.js',
'ncs.js',
'admin.js'
], 'public/js/admin.js');
// Copied Assets
// -------------------------------------------------- //
mix.copy(bowerPath + '/fancyBox/dist', 'public/plugins/fancybox');
mix.copy(bowerPath + '/moment/min/moment.min.js', 'public/js/vendor/moment.min.js');
mix.copy(bowerPath + '/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js', 'public/js/vendor/bootstrap-datetimepicker.min.js');
// mix.copy(bowerPath + '/select2/dist/css/select2.min.css', 'public/css/select2.css');
// mix.copy(bowerPath + '/bootstrap/fonts', 'public/fonts');
// mix.copy(bowerPath + '/dropzone/dist/min/basic.min.css', 'public/css/dropzone-basic.css');
// mix.copy(bowerPath + '/dropzone/dist/min/dropzone.min.css', 'public/css/dropzone.css');
// mix.copy(bowerPath + '/dropzone/dist/min/dropzone.min.js', 'public/js/vendor/dropzone.min.js');
// BrowserSync
// -------------------------------------------------- //
mix.browserSync({
proxy: 'mysite.dev'
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment