-
Notifications
You must be signed in to change notification settings - Fork 7
/
gulpfile.js
78 lines (71 loc) · 1.84 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
var gulp = require('gulp'),
sass = require('gulp-sass'),
rename = require('gulp-rename'),
autoprefixer = require('gulp-autoprefixer'),
gutil = require('gulp-util'),
babel = require('gulp-babel'),
concat = require('gulp-concat');
gulp.task('ply', () => {
gulp.src('./src/scss/ply-iso.scss')
.pipe(sass().on('error', sass.logError))
.pipe(autoprefixer(
{ cascade: true }
))
.pipe(rename('ply.css'))
.pipe(gulp.dest('./dist/css/'))
});
gulp.task('plyEssentials', () => {
gulp.src('./src/scss/ply-essentials.scss')
.pipe(sass({
outputStyle: 'compressed'
}).on('error', sass.logError))
.pipe(autoprefixer(
{ cascade: false }
))
.pipe(rename('ply-essentials.min.css'))
.pipe(gulp.dest('./dist/css/'))
});
gulp.task('plyHelpers', () => {
gulp.src('./src/scss/ply-helpers.scss')
.pipe(sass({
outputStyle: 'compressed'
}).on('error', sass.logError))
.pipe(autoprefixer(
{ cascade: false }
))
.pipe(rename('ply-helpers.min.css'))
.pipe(gulp.dest('./dist/css/'))
});
gulp.task('plyMin', () => {
gulp.src('./src/scss/ply-iso.scss')
.pipe(sass({
outputStyle: 'compressed'
}).on('error', sass.logError))
.pipe(autoprefixer(
{ cascade: false }
))
.pipe(rename('ply.min.css'))
.pipe(gulp.dest('./dist/css/'))
});
gulp.task('styles', () => {
gulp.src('./src/scss/styles.scss')
.pipe(sass().on('error', sass.logError))
.pipe(autoprefixer(
{ cascade: true }
))
.pipe(gulp.dest('./dist/css/'))
});
gulp.task('stylesMin', () => {
gulp.src('./src/scss/styles.scss')
.pipe(sass({
outputStyle: 'compressed'
}).on('error', sass.logError))
.pipe(autoprefixer(
{ cascade: true }
))
.pipe(rename('styles.min.css'))
.pipe(gulp.dest('./dist/css/'))
});
gulp.task('default',() => {
gulp.watch('./src/scss/styles.scss',['styles','stylesMin','plyEssentials']);
});