Skip to content

Commit

Permalink
New: node-sassオプションをconfigで設定できるように
Browse files Browse the repository at this point in the history
  • Loading branch information
sable-virt committed Dec 11, 2015
1 parent 7274dc5 commit 43f76b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 4 additions & 0 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ module.exports = {
autoTest: true,
// CSSの設定
style: {
// node-sass(https://github.com/sass/node-sass#options)
sass: {
outputStyle: 'compressed'
},
// autoPrefixer(https://github.com/postcss/autoprefixer#options)
autoprefixer: {
browsers: ['last 3 version', 'ie >= 9', 'Android 4.0'],
Expand Down
3 changes: 1 addition & 2 deletions gulp/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,11 @@ gulp.task('style', function() {
.pipe($.sassLint.format())
.pipe($.sassLint.failOnError())
.pipe($.if(!config.IS_PRODUCTION, $.sourcemaps.init()))
.pipe($.sass())
.pipe($.sass(config.style.sass))
.pipe($.postcss([
autoprefixer(config.style.autoprefixer),
cssMqpacker(config.style.mqpacker)
]))
.pipe($.minifyCss(config.style.minify))
.pipe($.if(!config.IS_PRODUCTION, $.sourcemaps.write(sourcemaps)))
.pipe(gulp.dest(config.path.style.dest))
.pipe($.browser.stream({match: "**/*.css"}));
Expand Down

0 comments on commit 43f76b2

Please sign in to comment.