forked from Maddious/RiTA-DiscordBot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
37 lines (31 loc) · 798 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
const gulp = require("gulp");
const eslint = require("gulp-eslint");
const watch = require("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));