-
Notifications
You must be signed in to change notification settings - Fork 2
/
gulpfile.js
51 lines (45 loc) · 1.17 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
var gulp = require('gulp'),
sass = require('gulp-sass'),
autoprefixer = require ('gulp-autoprefixer'),
concat = require('gulp-concat'),
gutil = require('gulp-util'),
uglify = require ('gulp-uglify')
/*babel = require('gulp-babel');*/
gulp.task('sass', function() {
gulp.src('./scss/*.scss')
.pipe(sass({
outputStyle: 'nested',
}))
.pipe(autoprefixer({
versions: ['last 2 browsers']
}))
.pipe(gulp.dest('./assets/css'))
});
gulp.task('default', function() {
gulp.watch('./scss/*.scss', ['sass']);
gulp.watch('./build/*.html', ['html']);
});
/*
gulp.task('scripts', function() {
gulp.src([
'./js/scripts.js',
'./dist/home/TweenMax.min.js',
])
.pipe(concat('bundle.js'))
.pipe(babel({
presets: ['es2015']
}))
.pipe(uglify().on('error', function(e){
console.log(e);
}))
.pipe(gulp.dest('./js'))
});
*/
const htmlPartial = require('gulp-html-partial');
gulp.task('html', function () {
gulp.src(['build/*.html'])
.pipe(htmlPartial({
basePath: 'build/partials/'
}))
.pipe(gulp.dest('dist'));
});