1
0
mirror of https://github.com/kognise/water.css.git synced 2025-08-11 07:34:43 +02:00

Remove sourcemap references from built files

This commit is contained in:
Svante Richter
2021-03-28 17:13:32 +02:00
parent 129e255eb4
commit aa70f707d9

View File

@@ -58,7 +58,6 @@ const style = () => {
return ( return (
gulp gulp
.src(paths.styles.src) .src(paths.styles.src)
.pipe(sourcemaps.init())
.pipe(postcss([postcssImport(), postcssColorModFunction(), postcssInlineSvg()])) .pipe(postcss([postcssImport(), postcssColorModFunction(), postcssInlineSvg()]))
.pipe(startDiff()) .pipe(startDiff())
@@ -69,12 +68,9 @@ const style = () => {
.pipe(postcss([autoprefixer()])) .pipe(postcss([autoprefixer()]))
.pipe(endDiff('autoprefixer')) .pipe(endDiff('autoprefixer'))
.pipe(sourcemaps.write('.'))
.pipe(flatten()) // Put files in out/*, not out/builds/* .pipe(flatten()) // Put files in out/*, not out/builds/*
.pipe(gulp.dest(paths.styles.dest)) .pipe(gulp.dest(paths.styles.dest))
.pipe(filter('**/*.css')) // Remove sourcemaps from the pipeline
// <minifying> // <minifying>
.pipe(startDiff()) .pipe(startDiff())
.pipe(postcss([cssnano({ preset: ['default', { svgo: { floatPrecision: 0 } }] })])) .pipe(postcss([cssnano({ preset: ['default', { svgo: { floatPrecision: 0 } }] })]))
@@ -82,11 +78,9 @@ const style = () => {
.pipe(rename({ suffix: '.min' })) .pipe(rename({ suffix: '.min' }))
// </minifying> // </minifying>
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest(paths.styles.dest)) .pipe(gulp.dest(paths.styles.dest))
.pipe(gulp.dest(paths.docs.dest + '/water.css')) .pipe(gulp.dest(paths.docs.dest + '/water.css'))
.pipe(filter('**/*.css')) // Remove sourcemaps from the pipeline
.pipe(sizereport({ gzip: true, total: false, title: 'SIZE REPORT' })) .pipe(sizereport({ gzip: true, total: false, title: 'SIZE REPORT' }))
.pipe(browserSync.stream()) .pipe(browserSync.stream())
) )