-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
49 lines (44 loc) · 1.63 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
var gulp = require('gulp'),
path = require('path'),
cleanCSS = require('gulp-clean-css'),
sass = require('gulp-sass'),
surge = require('gulp-surge'),
concat = require('gulp-concat-util'),
uglify = require('gulp-uglify'),
rename = require("gulp-rename");
gulp.task('default', function () {
// place code for your default task here
});
gulp.task('css', function () {
return gulp.src('./themes/helios/assets/sass/**/*.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('./themes/helios/static/css'))
.pipe(cleanCSS({compatibility: 'ie8'}))
.pipe(gulp.dest('./themes/helios/static/css'));
});
gulp.task('js', function () {
gulp.src(
[
'./themes/helios/static/js/jquery.dropotron.min.js',
'./themes/helios/static/js/jquery.scrolly.min.js',
'./themes/helios/static/js/jquery.onvisible.min.js',
'./themes/helios/static/js/skel.min.js',
'./themes/helios/static/js/util.js',
'./themes/helios/static/js/main.js'
])
.pipe(concat('dist.js'))
.pipe(concat.header('// file: <%= file.path %>\n'))
.pipe(concat.footer('\n// end\n'))
.pipe(uglify())
.pipe(rename({
suffix: '.min'
}))
.pipe(gulp.dest('./themes/helios/static/js'));
});
gulp.task('deploy', [], function () {
return surge({
project: './public', // Path to your static build directory
domain: 'https://jacquesliabeuf.com' // Your domain or Surge subdomain
})
});
gulp.task('assets', ['css', 'js']);