-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gulpfile.js
executable file
·57 lines (42 loc) · 1.27 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
53
54
55
56
57
/*
*/
var gulp = require('gulp');
// clean up activities
var strip = require('gulp-strip-comments');
var removeLines = require('gulp-remove-empty-lines');
// dist activities
var inline = require('gulp-inline-source');
var processhtml = require('gulp-processhtml');
//
var renamepath = require('gulp-rename');
var concat = require('gulp-concat');
var copy = require('gulp-copy');
/*
var json = require('./package.json');
json.prop
~VS~
var fs = require('fs');
var json = JSON.parse(fs.readFileSync('./package.json'));
json.prop
*/
gulp.task('buildassets', function(){
return gulp.src('./assets/**/*.*')
//does not require copy .pipe(copy())
.pipe(renamepath({dirname:''}))
.pipe(gulp.dest('dist/'))
});
gulp.task('buildjs', function(){
return gulp.src(['build/js/utils.js', 'build/js/dynamic.js', 'build/js/video.js', 'build/js/main.js'])
.pipe(concat('build.js'))
.pipe(strip({line:true}))
.pipe(removeLines())
.pipe(gulp.dest('dist/'))
});
gulp.task('buildhtml', function(){
return gulp.src('build/index.html')
.pipe(strip({line:true}))
.pipe(removeLines())
.pipe(inline())
.pipe(processhtml())
.pipe(gulp.dest('dist/'))
});