Skip to content

Commit

Permalink
styles: disableSourcemaps config option to disable source maps genera…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
enzy committed Oct 9, 2017
1 parent 4397732 commit 1559e1b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/tasks/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,11 @@ module.exports = function(gulp, config) {

// Init sourcemaps and plumber in devmode
if(config.devmode){
task = task
.pipe(plumber({ errorHandler: errorHandler.fail }))
.pipe(sourcemaps.init())
task = task.pipe(plumber({ errorHandler: errorHandler.fail }))

if(config.disableSourcemaps !== true) {
task = task.pipe(sourcemaps.init())
}
}

// Stylus part
Expand Down Expand Up @@ -78,7 +80,9 @@ module.exports = function(gulp, config) {
}

} else {
task = task.pipe(sourcemaps.write('.'))
if(config.disableSourcemaps !== true) {
task = task.pipe(sourcemaps.write('.'))
}
}

if(config.devmode){
Expand Down

0 comments on commit 1559e1b

Please sign in to comment.