Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function buildCss() {
return gulp.src(sourcePaths.cssEntry)
.pipe(sourcemaps.init())
.pipe(postcss([
atImport(),
sprites({
spritePath: targetDirs.images,
stylesheetPath: targetDirs.styles,
spritesmith: {
padding: 2,
},
}),
colorHexAlpha(),
autoprefixer(),
discardComments(),
]))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest(targetDirs.styles))
.pipe(rename(p => {
p.dirname = path.join(targetDirs.styles, p.dirname);
}))
.pipe(browserSync.stream());
}
export function buildCss() {
return gulp.src(sourcePaths.cssEntry)
.pipe(sourcemaps.init())
.pipe(postcss([
atImport(),
sprites({
spritePath: targetDirs.images,
stylesheetPath: targetDirs.styles,
spritesmith: {
padding: 2,
},
}),
colorHexAlpha(),
autoprefixer(),
discardComments(),
]))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest(targetDirs.styles))
.pipe(rename(p => {
p.dirname = path.join(targetDirs.styles, p.dirname);
}))
.pipe(browserSync.stream());
}