-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
52 lines (45 loc) · 1.11 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
'use strict';
var gulp = require('gulp');
var clean = require('gulp-clean');
var sass = require('gulp-sass');
var concat = require('gulp-concat');
var pug = require('gulp-pug');
gulp.task('dist:clean', function () {
return gulp.src('./dist', {read: false})
.pipe(clean());
});
gulp.task('sass:compile', function () {
return gulp.src('./src/sass/captain-icons.sass')
.pipe(sass({
outputStyle: 'extended'
})
.on('error', sass.logError))
.pipe(gulp.dest('dist'));
});
gulp.task('sass:minify', function () {
return gulp.src('./src/sass/captain-icons.sass')
.pipe(sass({
outputStyle: 'compressed'
})
.on('error', sass.logError))
.pipe(concat('captain-icons.min.css'))
.pipe(gulp.dest('dist'));
});
gulp.task('fonts:copy', function () {
return gulp.src('./src/web-fonts/*.*')
.pipe(gulp.dest('dist/web-fonts'));
});
gulp.task('pug:compile', function() {
return gulp.src('./src/index.pug')
.pipe(pug({
pretty: true
}))
.pipe(gulp.dest('./'))
});
gulp.task('build', [
'dist:clean',
'sass:compile',
'sass:minify',
'fonts:copy',
'pug:compile'
]);