0
SCSS를 컴파일하려고하는데 gull 오류가 발생합니다. 정의되지 않은 scss 변수 오류
그래서 난 내 코드를 확인하고 다 잘 나타납니다. 내 _colors.scss 파일의 변수는 다음과 같습니다. 여기// dark shades
$gray1: #3c3c3d !default;
$gray2: #5a5a5b !default;
$gray3: #7d7d7e !default;
그리고
는 _base.scss 에body{
box-sizing: border-box;
color: $gray1;
font-family: $base-font;
font-size: $font-size;
line-height: $line-height;
min-height: 100%;
position: relative;
}
을 오류를 유발하는 라인입니다 그리고 여기에 내가 도망 내 gulpfile CSS의 작업입니다.
gulp.task('css', function() {
return sass('scss/**/*.scss')
.pipe(sourcemaps.init())
.pipe(autoprefixer())
.pipe(concat('styles.css'))
.on('error', sass.logError)
.pipe(sourcemaps.write())
.pipe(gulp.dest('./css'))
.pipe(notify({ message: 'Wait for it....wait for it!!!' }));
});
내 코드의 모든
은 당신이 일 수 있었다하지 않을 경우
_base.scss 앞에 _collors.scss를 포함시키지 않았습니까? 컴파일하지 않았을 때 컴파일 할 수 있었습니까? 나중에 importet 가져 오기 때문에 변수를 알고 –
Ahhhh !!! 그게 전부 야. SASS를 사용한 이후로 잠시 동안. 의견을 답변으로 추가하면 정확한 표시가됩니다. –