Added source map to css files
This commit is contained in:
parent
809c8a7f37
commit
8090c853ba
|
@ -1,5 +1,6 @@
|
||||||
var gulp = require('gulp');
|
var gulp = require('gulp');
|
||||||
var less = require('gulp-less');
|
var less = require('gulp-less');
|
||||||
|
var sourcemaps = require('gulp-sourcemaps');
|
||||||
var print = require('gulp-print');
|
var print = require('gulp-print');
|
||||||
var phantom = require('./phantom');
|
var phantom = require('./phantom');
|
||||||
var livereload = require('gulp-livereload');
|
var livereload = require('gulp-livereload');
|
||||||
|
@ -33,7 +34,7 @@ gulp.task('less', function() {
|
||||||
paths.src.content + 'overrides.less',
|
paths.src.content + 'overrides.less',
|
||||||
paths.src.root + 'Series/series.less',
|
paths.src.root + 'Series/series.less',
|
||||||
paths.src.root + 'Activity/activity.less',
|
paths.src.root + 'Activity/activity.less',
|
||||||
paths.src.root + 'AddSeries/addSeries.less',
|
paths.src.root + 'AddSeries/AddSeries.less',
|
||||||
paths.src.root + 'Calendar/calendar.less',
|
paths.src.root + 'Calendar/calendar.less',
|
||||||
paths.src.root + 'Cells/cells.less',
|
paths.src.root + 'Cells/cells.less',
|
||||||
paths.src.root + 'ManualImport/manualimport.less',
|
paths.src.root + 'ManualImport/manualimport.less',
|
||||||
|
@ -46,6 +47,7 @@ gulp.task('less', function() {
|
||||||
|
|
||||||
return gulp.src(src)
|
return gulp.src(src)
|
||||||
.pipe(print())
|
.pipe(print())
|
||||||
|
.pipe(sourcemaps.init())
|
||||||
.pipe(less({
|
.pipe(less({
|
||||||
dumpLineNumbers : 'false',
|
dumpLineNumbers : 'false',
|
||||||
compress : true,
|
compress : true,
|
||||||
|
@ -54,6 +56,7 @@ gulp.task('less', function() {
|
||||||
strictImports : true
|
strictImports : true
|
||||||
}))
|
}))
|
||||||
.on('error', errorHandler.onError)
|
.on('error', errorHandler.onError)
|
||||||
|
.pipe(sourcemaps.write())
|
||||||
.pipe(gulp.dest(paths.dest.content))
|
.pipe(gulp.dest(paths.dest.content))
|
||||||
.pipe(livereload());
|
.pipe(livereload());
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
var gulp = require('gulp');
|
var gulp = require('gulp');
|
||||||
var gulpWebpack = require('webpack-stream');
|
var webpackStream = require('webpack-stream');
|
||||||
var livereload = require('gulp-livereload');
|
var livereload = require('gulp-livereload');
|
||||||
|
|
||||||
var webpackConfig = require('../webpack.config');
|
var webpackConfig = require('../webpack.config');
|
||||||
webpackConfig.devtool = "#source-map";
|
webpackConfig.devtool = "#source-map";
|
||||||
|
|
||||||
gulp.task('webpack', function() {
|
gulp.task('webpack', function() {
|
||||||
return gulp.src('main.js').pipe(gulpWebpack(webpackConfig)).pipe(gulp.dest(''));
|
return gulp.src('main.js').pipe(webpackStream(webpackConfig)).pipe(gulp.dest(''));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('webpackWatch', function() {
|
gulp.task('webpackWatch', function() {
|
||||||
webpackConfig.watch = true;
|
webpackConfig.watch = true;
|
||||||
return gulp.src('main.js').pipe(gulpWebpack(webpackConfig)).pipe(gulp.dest('')).pipe(livereload());
|
return gulp.src('main.js').pipe(webpackStream(webpackConfig)).pipe(gulp.dest('')).pipe(livereload());
|
||||||
});
|
});
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
"gulp-print": "1.1.0",
|
"gulp-print": "1.1.0",
|
||||||
"gulp-replace": "0.5.3",
|
"gulp-replace": "0.5.3",
|
||||||
"gulp-run": "1.6.8",
|
"gulp-run": "1.6.8",
|
||||||
|
"gulp-sourcemaps": "1.5.2",
|
||||||
"gulp-stripbom": "1.0.4",
|
"gulp-stripbom": "1.0.4",
|
||||||
"gulp-webpack": "1.5.0",
|
"gulp-webpack": "1.5.0",
|
||||||
"gulp-wrap": "0.11.0",
|
"gulp-wrap": "0.11.0",
|
||||||
|
|
Loading…
Reference in New Issue