깨끗한 CSS (접두사가없는 CSSed 및 축소 된)에 sass를 컴파일하기 위해 꿀꺽 꿀꺽 삼키는 가장 좋은 방법은 무엇입니까?올바른 소스 맵 얻기 (꿀꺽 꿀꺽 마시고 + 깨끗하게 + 접두사 + uncss)
다음 예제에서는 소스 맵을 생성하지만 브라우저 관리자에서 볼 때 소스 파일의 잘못된 행 번호를 가리키고 있습니다.
var plugins = require('gulp-load-plugins')(),
bourbon = require('node-bourbon').includePaths,
neat = require('node-neat').includePaths;
gulp.task('default', function() {
return gulp.src('src/scss/**/*.scss')
.pipe(plugins.sourcemaps.init())
.pipe(plugins.sass({includePaths: bourbon, includePaths: neat}))
.on('error',plugins.util.log.bind(plugins.util, 'Sass Error'))
.pipe(plugins.concat('styles.css'))
.pipe(plugins.uncss({html: ['dist/**/*.html']}))
.pipe(plugins.autoprefixer())
.pipe(plugins.cleanCss())
.pipe(plugins.sourcemaps.write('.'))
.pipe(gulp.dest('dist/css/'));
});
내가
autoprefixer
및
cleanCss
전에 출력 sourcemaps에 노력이 문제를 해결하기위한 시도에서
하지만 "깔끔한"와 "Burbon"경로와 관련된 오류가 발생합니다 : 내가이 작업을 작업 Error: Broken @import declaration of "../neat" Broken @import declaration of "../colors" Broken @import declaration of "../variables" Broken @import declaration of "../grid" Broken @import declaration of "../tables"
당신은 "라인"잘못 말한다. 브라우저의 검사기를 사용할 때 라인 번호를 의미합니까? – henry
예 @henry, 브라우저 검사기에서 줄 번호를 나타냅니다. 나는 그것을 반영하기 위해 질문을 업데이트 할 것이다. 감사합니다 – ramin