Skip to content

Instantly share code, notes, and snippets.

@saihoooooooo
Last active January 8, 2016 10:03
Show Gist options
  • Save saihoooooooo/c7db28c21aab06a0e850 to your computer and use it in GitHub Desktop.
Save saihoooooooo/c7db28c21aab06a0e850 to your computer and use it in GitHub Desktop.
gulp-sass test
'use strict';
var gulp = require('gulp');
var sass = require('gulp-sass');
var sourcemaps = require('gulp-sourcemaps');
var path = require('path');
gulp.task('sass', function () {
gulp.src('./sass/**/*.scss')
.pipe(sourcemaps.init())
.pipe(sass({
includePaths: [
path.join(__dirname, 'node_modules/normalize-scss/sass'),
path.join(__dirname, 'node_modules/support-for/sass')
]
}).on('error', sass.logError))
.pipe(sourcemaps.write('./maps'))
.pipe(gulp.dest('./css'));
});
gulp.task('sass:watch', function () {
gulp.watch('./sass/**/*.scss', ['sass']);
});
{
"name": "gulp-sass-test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"devDependencies": {
"gulp-sass": "^2.1.1",
"gulp-sourcemaps": "^1.6.0"
},
"dependencies": {
"normalize-scss": "^4.0.3",
"support-for": "^1.0.3"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment