blue-twilight/gulpfile.js

65 lines
1.6 KiB
JavaScript
Raw Normal View History

/*
* Blue Twilight Gulp build file
*/
var gulp = require('gulp-help')(require('gulp'));
// Dependencies
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var uglifyCss = require('gulp-uglifycss');
var cssFiles = [
'resources/assets/css/**/*.css',
'resources/assets/bootstrap/css/bootstrap.css',
'resources/assets/font-awesome/css/font-awesome.css'
],
cssDest = 'public/css';
var jsFiles = [
'resources/assets/js/**/*.js',
'resources/assets/bootstrap/js/bootstrap.js'
],
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));
});
gulp.task('bt-assets-css-min', function() {
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));
});
gulp.task('bt-assets-js-min', function() {
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',
'bt-assets-css-min',
'bt-assets-js',
'bt-assets-js-min',
'bt-assets-fonts'
]);