forked from o2team/o2team.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
37 lines (34 loc) · 873 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
'use strict';
var gulp = require('gulp'),
$ = require('gulp-load-plugins')(),
yaml = require('js-yaml'),
fs = require('fs'),
cfg = yaml.safeLoad(fs.readFileSync('_config.yml')),
htmlMinifierOptions = {
removeComments: true,
collapseWhitespace: true,
collapseBooleanAttributes: true,
removeScriptTypeAttributes: true,
removeStyleLinkTypeAttributes: true,
removeOptionalTags: true,
minifyJS: true,
minifyCSS: true
},
dirs = {
public: 'public',
fonts: 'public/fonts',
imgs: 'public/img',
css: 'public/css',
js: 'public/js',
temp: 'temp',
hidden: '.o2',
assetsDir:'public/assets'
};
require('gulp-task-loader')({
$: $,
cfg: cfg,
htmlMinifierOptions: htmlMinifierOptions,
dirs: dirs
});
gulp.task('rev', ['rev:replace']);
gulp.task('default', ['rev', 'replace', 'copy', 'cleanup']);