-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_TASK_sass.js
More file actions
executable file
·37 lines (30 loc) · 1.33 KB
/
_TASK_sass.js
File metadata and controls
executable file
·37 lines (30 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// jshint ignore: start
'use strict';
var gulp = require('gulp');
var sass = require('gulp-sass');
var sourcemaps = require('gulp-sourcemaps');
var sassGlob = require('gulp-sass-glob');
// Some configs:
// Here we define which sass dirs we should process/watch and which exclude.
// In this case we firt add all .scss files, the exclude "external-libraries" dir and it sub dirs
var sassSrcDirs = ['sass/**/*.scss', '!sass/external-libraries', '!sass/external-libraries/**'];
gulp.task('sass', function () {
return gulp.src(sassSrcDirs)
// Enables globing file read ("**/*.scss")
.pipe(sassGlob())
// sourcemap start "listening"
.pipe(sourcemaps.init())
// Compile sass files
.pipe(sass({
// Explanded allow developers to get a more readable compiled code.
// Its ok, on super tasks like "build-prod" or similar it can be compressed and packed.
outputStyle: 'expanded',
// Are you using some sass plugin provided via package.json?
// If the plugin's instructions require a gulp inclusion this is the right place.
includePaths: ['./node_modules/breakpoint-sass/stylesheets']
}).on('error', sass.logError))
// Finish sourcemap reading and write the output file aside the compiled css files.
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('css'));
});
gulp.task('build', ['sass']);