Last active
July 12, 2016 02:32
-
-
Save dstyle0210/d1630554218201c9389b1ac7f5bb9bd7 to your computer and use it in GitHub Desktop.
[gulp] gulp-sass 사용법.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| var gulp = require('gulp'); | |
| var sass = require('gulp-sass'); | |
| // 자세한 옵션은 "https://github.com/sass/node-sass#options" 에서 확인 필요. | |
| var sass_opt = { | |
| /** | |
| * outputStyle (Type : String , Default : nested) | |
| * CSS의 컴파일 결과 코드스타일 지정 | |
| * Values : nested, expanded, compact, compressed | |
| */ | |
| outputStyle:"nested", | |
| /** | |
| * indentType (>= v3.0.0 , Type : String , Default : space) | |
| * 컴파일 된 CSS의 "들여쓰기" 의 타입 | |
| * Values : space , tab | |
| */ | |
| indentType:"space", | |
| /** | |
| * indentWidth (>= v3.0.0, Type : Integer , Default : 2) | |
| * 컴파일 된 CSS의 "들여쓰기" 의 갯수 | |
| */ | |
| indentWidth:2, | |
| /** | |
| * precision (Type : Integer , Default : 5) | |
| * 컴파일 된 CSS의 소수점 자리수. | |
| */ | |
| precision:5, | |
| /** | |
| * sourceComments (Type : Boolean , Default : false) | |
| * 컴파일 된 CSS에 원본소스의 위치와 줄수 주석표시. | |
| */ | |
| sourceComments:false | |
| } | |
| gulp.task('sass', function () { | |
| return gulp.src('./src/scss/**/*.scss') | |
| .pipe(sass(sass_opt).on('error', sass.logError)) | |
| .pipe(gulp.dest('./src/')); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment