2016-09-01 16:23:39 +01:00
|
|
|
/*
|
2017-03-22 16:55:39 +00:00
|
|
|
* Blue Twilight Gulp build file
|
2016-09-01 16:23:39 +01:00
|
|
|
*/
|
|
|
|
|
2017-03-22 16:55:39 +00:00
|
|
|
var gulp = require('gulp-help')(require('gulp'));
|
|
|
|
|
|
|
|
// Dependencies
|
|
|
|
var concat = require('gulp-concat');
|
2017-08-30 22:09:30 +01:00
|
|
|
var uglify = require('gulp-uglify-es').default;
|
2017-03-22 16:55:39 +00:00
|
|
|
var uglifyCss = require('gulp-uglifycss');
|
|
|
|
|
|
|
|
var cssFiles = [
|
|
|
|
'resources/assets/css/**/*.css',
|
|
|
|
'resources/assets/bootstrap/css/bootstrap.css',
|
2017-09-10 10:24:15 +01:00
|
|
|
'resources/assets/font-awesome/css/font-awesome.css',
|
|
|
|
'resources/assets/selectize/css/selectize.css',
|
|
|
|
'resources/assets/selectize/css/selectize.bootstrap3.css'
|
2017-03-22 16:55:39 +00:00
|
|
|
],
|
|
|
|
cssDest = 'public/css';
|
|
|
|
|
|
|
|
var jsFiles = [
|
|
|
|
'resources/assets/js/**/*.js',
|
2017-08-30 22:09:30 +01:00
|
|
|
'resources/assets/popper-js/popper.js',
|
|
|
|
'resources/assets/popper-js/popper-utils.js',
|
2017-09-10 10:24:15 +01:00
|
|
|
'resources/assets/bootstrap/js/bootstrap.js',
|
|
|
|
'resources/assets/selectize/js/standalone/selectize.js'
|
2017-03-22 16:55:39 +00:00
|
|
|
],
|
|
|
|
jsDest = 'public/js';
|
|
|
|
|
|
|
|
var fontsFiles = 'resources/assets/font-awesome/fonts/**/*',
|
|
|
|
fontsDest = 'public/fonts';
|
|
|
|
|
|
|
|
gulp.task('bt-assets-css', function() {
|
|
|
|
return gulp.src(cssFiles)
|
|
|
|
.pipe(concat('blue-twilight.css'))
|
|
|
|
.pipe(gulp.dest(cssDest));
|
|
|
|
});
|
|
|
|
|
2017-08-30 22:09:30 +01:00
|
|
|
gulp.task('bt-assets-css-min', ['bt-assets-css'], function() {
|
2017-03-22 16:55:39 +00:00
|
|
|
return gulp.src(cssFiles)
|
|
|
|
.pipe(concat('blue-twilight.min.css'))
|
|
|
|
.pipe(uglifyCss())
|
|
|
|
.pipe(gulp.dest(cssDest));
|
|
|
|
});
|
|
|
|
|
|
|
|
gulp.task('bt-assets-js', function() {
|
|
|
|
return gulp.src(jsFiles)
|
|
|
|
.pipe(concat('blue-twilight.js'))
|
|
|
|
.pipe(gulp.dest(jsDest));
|
|
|
|
});
|
|
|
|
|
2017-08-30 22:09:30 +01:00
|
|
|
gulp.task('bt-assets-js-min', ['bt-assets-js'], function() {
|
2017-03-22 16:55:39 +00:00
|
|
|
return gulp.src(jsFiles)
|
|
|
|
.pipe(concat('blue-twilight.min.js'))
|
|
|
|
.pipe(uglify())
|
|
|
|
.pipe(gulp.dest(jsDest));
|
|
|
|
});
|
|
|
|
|
|
|
|
gulp.task('bt-assets-fonts', function() {
|
|
|
|
return gulp.src(fontsFiles)
|
|
|
|
.pipe(gulp.dest(fontsDest));
|
|
|
|
});
|
|
|
|
|
|
|
|
gulp.task('bt-assets', false, [
|
|
|
|
'bt-assets-css-min',
|
|
|
|
'bt-assets-js-min',
|
|
|
|
'bt-assets-fonts'
|
|
|
|
]);
|