-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
54 lines (50 loc) · 1.87 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
'use strict'
// TODO ディレクトリ名「gulpfile.js」がlint-stagedでパスできる方法が見つかったら`gulpfile.js/`配下に移動する
const gulp = require('gulp')
// tasks
const cleanGarbage = require('./gulpfilejs/tasks/cleanGarbage')
const js = require('./gulpfilejs/tasks/js')
const jsBuild = require('./gulpfilejs/tasks/jsBuild')
const cleanAll = require('./gulpfilejs/tasks/cleanAll')
const cleanImg = require('./gulpfilejs/tasks/cleanImg')
const cleanEjs = require('./gulpfilejs/tasks/cleanEjs')
const scss = require('./gulpfilejs/tasks/scss')
const scssProduction = require('./gulpfilejs/tasks/scssProduction')
const img = require('./gulpfilejs/tasks/img')
const imgManual = require('./gulpfilejs/tasks/imgManual')
const sync = require('./gulpfilejs/tasks/sync')
const genPublishDir = require('./gulpfilejs/tasks/genPublishDir')
const ejsCompile = require('./gulpfilejs/tasks/ejsCompile')
const genZipArchive = require('./gulpfilejs/tasks/genZipArchive')
const watch = require('./gulpfilejs/tasks/watch')
const jsoncFileCeck = require('./gulpfilejs/tasks/jsoncFileCeck')
exports.default = gulp.series(jsoncFileCeck, gulp.parallel(watch, sync))
exports.development = gulp.series(jsoncFileCeck, cleanAll, scss, img, imgManual, ejsCompile, js)
exports.production = gulp.series(
jsoncFileCeck,
cleanAll,
scssProduction,
img,
imgManual,
ejsCompile,
jsBuild,
cleanGarbage,
genPublishDir
)
exports.productionNoImg = gulp.series(jsoncFileCeck, scssProduction, ejsCompile, jsBuild, cleanGarbage, genPublishDir)
exports.checkJson = jsoncFileCeck
exports.zip = gulp.series(
jsoncFileCeck,
cleanAll,
scssProduction,
img,
imgManual,
ejsCompile,
jsBuild,
cleanGarbage,
genZipArchive
)
exports.resetImg = gulp.series(cleanImg, img, imgManual)
exports.resetEjs = gulp.series(cleanEjs, ejsCompile)
exports.garbage = cleanGarbage
exports.jsBuild = gulp.series(jsBuild)