-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
34 lines (28 loc) · 883 Bytes
/
gulpfile.js
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
'use strict';
var gulp = require("gulp"),
concat = require("gulp-concat"),
cssnano = require("gulp-cssnano"), // minify
notify = require("gulp-notify"),
uglify = require("gulp-uglify"),
rename = require("gulp-rename"), // to rename any file
sass = require('gulp-ruby-sass'),
postcss = require('gulp-postcss'),
autoprefixer = require('autoprefixer');
var config = {
sassPath: "sass"
}
var processors = [
autoprefixer
];
gulp.task("css", function() {
return sass(config.sassPath + "/main.scss", { style: "expanded" })
.pipe(postcss(processors))
.pipe(gulp.dest("css"))
.pipe(rename({suffix: '.min'}))
.pipe(cssnano())
.pipe(gulp.dest("css"));
});
gulp.task("sass:watch", function() {
gulp.watch(config.sassPath + "/*.scss", ["css"]);
});
gulp.task("default", ["css"]);