Minify styles in addition to scripts
This commit is contained in:
parent
c3987d1dc2
commit
57a06b830b
3363
client/dist/all.js
vendored
3363
client/dist/all.js
vendored
File diff suppressed because one or more lines are too long
14
client/dist/styles.css
vendored
Normal file
14
client/dist/styles.css
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -1,10 +1,9 @@
|
||||
var concat = require('gulp-concat');
|
||||
var gulp = require('gulp');
|
||||
var jshint = require('gulp-jshint');
|
||||
var rename = require('gulp-rename');
|
||||
var sourcemaps = require('gulp-sourcemaps');
|
||||
var uglify = require('gulp-uglify');
|
||||
var mainBowerFiles = require('main-bower-files');
|
||||
var concat = require('gulp-concat');
|
||||
var gulp = require('gulp');
|
||||
var jshint = require('gulp-jshint');
|
||||
var minifyCss = require('gulp-minify-css');
|
||||
var sourcemaps = require('gulp-sourcemaps');
|
||||
var uglify = require('gulp-uglify');
|
||||
|
||||
var paths = {
|
||||
js: [
|
||||
@ -16,10 +15,15 @@ var paths = {
|
||||
'bower_components/bootstrap/dist/js/bootstrap.min.js',
|
||||
'bower_components/bootstrap-select/dist/js/bootstrap-select.min.js',
|
||||
'js/*.js'
|
||||
]
|
||||
],
|
||||
css: [
|
||||
'bower_components/bootstrap/dist/css/bootstrap.min.css',
|
||||
'bower_components/bootstrap/dist/css/bootstrap-theme.min.css',
|
||||
'bower_components/bootstrap-select/dist/css/bootstrap-select.min.css',
|
||||
'css/*.css'
|
||||
],
|
||||
};
|
||||
|
||||
|
||||
gulp.task('lint', function() {
|
||||
return gulp.src('js/*.js')
|
||||
.pipe(jshint())
|
||||
@ -28,11 +32,16 @@ gulp.task('lint', function() {
|
||||
|
||||
gulp.task('scripts', function() {
|
||||
return gulp.src(paths.js)
|
||||
.pipe(concat('all.js'))
|
||||
.pipe(gulp.dest('dist'))
|
||||
.pipe(rename('all.min.js'))
|
||||
.pipe(concat('scripts.js'))
|
||||
.pipe(uglify())
|
||||
.pipe(gulp.dest('dist'));
|
||||
});
|
||||
|
||||
gulp.task('default', ['scripts']);
|
||||
gulp.task('styles', function() {
|
||||
return gulp.src(paths.css)
|
||||
.pipe(concat('styles.css'))
|
||||
.pipe(minifyCss())
|
||||
.pipe(gulp.dest('dist'));
|
||||
});
|
||||
|
||||
gulp.task('default', ['lint', 'scripts', 'styles']);
|
||||
|
@ -12,6 +12,7 @@
|
||||
"gulp": "^3.8.8",
|
||||
"gulp-concat": "^2.4.1",
|
||||
"gulp-jshint": "^1.8.4",
|
||||
"gulp-minify-css": "^0.3.10",
|
||||
"gulp-rename": "^1.2.0",
|
||||
"gulp-sourcemaps": "^1.2.2",
|
||||
"gulp-uglify": "^1.0.1",
|
||||
|
Loading…
Reference in New Issue
Block a user