-
Notifications
You must be signed in to change notification settings - Fork 363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
评论:使用 gulp 压缩 CSS #12
Labels
Comments
这个链接打不开 |
现在的话gulp-minify-css是已经被舍弃掉了,现在都是gulp-clean-css,这个也挺好都用的。gulp-clean-css |
好的,感谢告知。 |
我跟着操作 但最后没有压缩成功 是复制了一个css文件夹出来 |
@shujiabi 你的task怎么写的?使用的是 https://www.npmjs.com/package/gulp-clean-css let gulp = require('gulp');
let cleanCSS = require('gulp-clean-css');
let sourcemaps = require('gulp-sourcemaps');
gulp.task('minify-css',() => {
return gulp.src('./src/*.css')
.pipe(sourcemaps.init())
.pipe(cleanCSS())
.pipe(sourcemaps.write())
.pipe(gulp.dest('dist'));
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
请在此处留下你对 使用 gulp 压缩 CSS 的评论
The text was updated successfully, but these errors were encountered: