-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
41 lines (32 loc) · 1001 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
35
36
37
38
39
40
41
var gulp = require('gulp');
var sass = require('gulp-sass');
var jetpack = require('fs-jetpack');
var appDir = jetpack.cwd('app');
var buildDir = jetpack.cwd('build');
gulp.task('build', ['copy', 'sass', 'scss'], function () {
return;
});
gulp.task('copy', ['clean'], function () {
return appDir.copy('.', buildDir.path(), {
matching: [ 'html/**'
, 'js/**'
, 'css/**'
, 'img/**'
, 'main.js'
, 'package.json'
]
});
});
gulp.task('clean', function () {
return buildDir.remove();
});
gulp.task('scss', function () {
return gulp.src(appDir.path('sass/**/*.scss'))
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest(buildDir.path('css')));
});
gulp.task('sass', function () {
return gulp.src(appDir.path('sass/**/*.sass'))
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest(buildDir.path('css')));
});