const postcssUrl = require('postcss-url')
const postcssVar = require('postcss-custom-properties')
const uglify = require('gulp-uglify')
+const sourcemaps = require('gulp-sourcemaps')
const vfs = require('vinyl-fs')
module.exports = (src, dest, preview) => () => {
return merge(
vfs
.src('js/+([0-9])-*.js', opts)
+ .pipe(sourcemaps.init())
.pipe(uglify())
- .pipe(concat('js/site.js')),
+ .pipe(concat('js/site.js'))
+ .pipe(sourcemaps.write('.')),
vfs
.src('js/vendor/*.js', { ...opts, read: false })
.pipe(
"gulp-eslint": "~5.0",
"gulp-imagemin": "~5.0",
"gulp-postcss": "~8.0",
+ "gulp-sourcemaps": "~2.6",
"gulp-stylelint": "~8.0",
"gulp-uglify": "~3.0",
"gulp-vinyl-zip": "~2.1 >=2.1.2",