-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
43 lines (38 loc) · 1.29 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
const gulp = require('gulp')
const terser = require('gulp-terser')
const sass = require('gulp-sass')
const cleanCSS = require('gulp-clean-css')
const flatten = require('gulp-flatten')
const concat = require('gulp-concat')
const rename = require('gulp-rename')
function javascript () {
return gulp.src([
'node_modules/jquery/dist/jquery.js',
'node_modules/popper.js/dist/umd/popper.js',
'node_modules/bootstrap/dist/js/bootstrap.js',
'node_modules/moment/moment.js',
'node_modules/jplayer/dist/jplayer/jquery.jplayer.js',
'src/js/clippy.js',
'src/js/ejs.js',
'src/js/randomvictory.js'], { base: '.' })
.pipe(terser())
.pipe(concat('randomvictory.min.js'))
.pipe(gulp.dest('rootPath/js/'))
}
function css () {
return gulp.src('src/style/randomvictory.scss')
.pipe(sass({ paths: [ '.' ] }))
.pipe(cleanCSS())
.pipe(rename('randomvictory.min.css'))
.pipe(gulp.dest('rootPath/css/'))
}
function jplayer () {
return gulp.src(['node_modules/jplayer/dist/jplayer/jquery.jplayer.swf'], { base: '.' })
.pipe(gulp.dest('rootPath/js/'))
}
function fonts () {
return gulp.src(['node_modules/font-awesome/fonts/*'], { base: './' })
.pipe(flatten())
.pipe(gulp.dest('rootPath/fonts/'))
}
exports.default = gulp.series(javascript, css, jplayer, fonts)