Added source map to css files

pull/4/head
Keivan Beigi 10 years ago
parent 809c8a7f37
commit 8090c853ba

@ -1,5 +1,6 @@
var gulp = require('gulp');
var less = require('gulp-less');
var sourcemaps = require('gulp-sourcemaps');
var print = require('gulp-print');
var phantom = require('./phantom');
var livereload = require('gulp-livereload');
@ -33,7 +34,7 @@ gulp.task('less', function() {
paths.src.content + 'overrides.less',
paths.src.root + 'Series/series.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 + 'Cells/cells.less',
paths.src.root + 'ManualImport/manualimport.less',
@ -46,6 +47,7 @@ gulp.task('less', function() {
return gulp.src(src)
.pipe(print())
.pipe(sourcemaps.init())
.pipe(less({
dumpLineNumbers : 'false',
compress : true,
@ -54,6 +56,7 @@ gulp.task('less', function() {
strictImports : true
}))
.on('error', errorHandler.onError)
.pipe(sourcemaps.write())
.pipe(gulp.dest(paths.dest.content))
.pipe(livereload());
});

@ -1,15 +1,15 @@
var gulp = require('gulp');
var gulpWebpack = require('webpack-stream');
var webpackStream = require('webpack-stream');
var livereload = require('gulp-livereload');
var webpackConfig = require('../webpack.config');
webpackConfig.devtool = "#source-map";
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() {
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-replace": "0.5.3",
"gulp-run": "1.6.8",
"gulp-sourcemaps": "1.5.2",
"gulp-stripbom": "1.0.4",
"gulp-webpack": "1.5.0",
"gulp-wrap": "0.11.0",

Loading…
Cancel
Save