Commit 7447bac3 authored by Pooja Patel's avatar Pooja Patel 😊 Committed by Claudio Wunder
Browse files

Automated adding of index.min.css.map in gulp on npm build

parent cba81eed
const gulp = require('gulp');
const compile = require('gulp-postcss');
const maps = require('gulp-sourcemaps');
const rename = require('gulp-rename');
const sourcemaps = require('gulp-sourcemaps');
const clean = require('gulp-clean-css');
const rename = require('gulp-rename');
const filter = require('gulp-filter');
gulp.task('build', () =>
gulp.src('src/index.css').
pipe(maps.init()).
pipe(compile()).
pipe(maps.write('.')).
pipe(gulp.dest('dist')).
pipe(clean()).
pipe(rename('index.min.css')).
pipe(gulp.dest('dist')),
);
\ No newline at end of file
gulp.src('src/index.css')
.pipe(sourcemaps.init())
.pipe(compile())
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('dist'))
.pipe(filter('**/*.css'))
.pipe(clean())
.pipe(rename({suffix:'.min'}))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest("dist")),
);
This diff is collapsed.
......@@ -12,6 +12,7 @@
"gulp": "^4.0.2",
"gulp-clean-css": "^4.3.0",
"gulp-concat-css": "^3.1.0",
"gulp-filter": "^6.0.0",
"gulp-postcss": "^8.0.0",
"gulp-rename": "^2.0.0",
"gulp-sourcemaps": "^2.6.5",
......@@ -21,8 +22,8 @@
},
"peerDependencies": {
"autoprefixer": "^9.4.5",
"postcss-nested": "^4.1.1",
"postcss": "^7.0.0"
"postcss": "^7.0.0",
"postcss-nested": "^4.1.1"
},
"repository": {
"type": "git",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment