commit
e16bff3d93
|
@ -30,6 +30,7 @@ var uglify = require('gulp-uglify');
|
||||||
var merge2 = require('merge2');
|
var merge2 = require('merge2');
|
||||||
var ignore = require('gulp-ignore');
|
var ignore = require('gulp-ignore');
|
||||||
var rimraf = require('gulp-rimraf');
|
var rimraf = require('gulp-rimraf');
|
||||||
|
var sourcemaps = require('gulp-sourcemaps');
|
||||||
var browserSync = require('browser-sync').create();
|
var browserSync = require('browser-sync').create();
|
||||||
|
|
||||||
// Run:
|
// Run:
|
||||||
|
@ -55,9 +56,11 @@ gulp.task('watch', function () {
|
||||||
// Minifies CSS files
|
// Minifies CSS files
|
||||||
gulp.task('cssnano', ['cleancss'], function(){
|
gulp.task('cssnano', ['cleancss'], function(){
|
||||||
return gulp.src('./css/*.css')
|
return gulp.src('./css/*.css')
|
||||||
|
.pipe(sourcemaps.init({loadMaps: true}))
|
||||||
.pipe(plumber())
|
.pipe(plumber())
|
||||||
.pipe(rename({suffix: '.min'}))
|
.pipe(rename({suffix: '.min'}))
|
||||||
.pipe(cssnano({discardComments: {removeAll: true}}))
|
.pipe(cssnano({discardComments: {removeAll: true}}))
|
||||||
|
.pipe(sourcemaps.write())
|
||||||
.pipe(gulp.dest('./css/'))
|
.pipe(gulp.dest('./css/'))
|
||||||
.pipe(browserSync.stream());
|
.pipe(browserSync.stream());
|
||||||
});
|
});
|
||||||
|
@ -168,4 +171,4 @@ gulp.task('copy-assets', function() {
|
||||||
// Copy Tether CSS files
|
// Copy Tether CSS files
|
||||||
gulp.src(basePaths.bower + 'tether/dist/css/*.css')
|
gulp.src(basePaths.bower + 'tether/dist/css/*.css')
|
||||||
.pipe(gulp.dest(basePaths.dev + '/css'));
|
.pipe(gulp.dest(basePaths.dev + '/css'));
|
||||||
});
|
});
|
||||||
|
|
Reference in New Issue