forked from Maddious/RiTA-DiscordBot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
44 lines (32 loc) · 852 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
38
39
40
41
42
43
/* eslint-disable no-unused-vars */
const gulp = require("gulp");
const eslint = require("gulp-eslint");
const watch = require("rita-gulp-watch");
const lec = require("gulp-line-ending-corrector");
// const uglify = require('gulp-uglify-es').default;
// tasks
function lint ()
{
// execute
return gulp.src(["src/**/*.js"]).
pipe(lec()).
pipe(eslint()).
pipe(eslint.format()).
pipe(eslint.failAfterError());
}
function compress ()
{
// execute
return gulp.src("src/**/*.js").
// .pipe(uglify())
pipe(gulp.dest("build"));
}
function GulpWatch ()
{
gulp.watch("src/**/*.js", gulp.series("default"));
}
gulp.task("compress", compress);
gulp.task("lint", lint);
gulp.task("watch", GulpWatch);
gulp.task("default", gulp.parallel(lint, compress));
gulp.task("build", gulp.parallel(lint, compress));