forked from github-tools/github-release-notes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
33 lines (26 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
const babel = require("gulp-babel");
const chmod = require("gulp-chmod");
const eslint = require("gulp-eslint");
const prettier = require("gulp-prettier");
const gulp = require("gulp");
gulp.task("scripts", (done) => {
gulp.src("./lib/src/**/*.js").pipe(babel()).pipe(gulp.dest("dist"));
gulp.src("./lib/src/**/*.json").pipe(gulp.dest("dist"));
gulp.src("./lib/*.js").pipe(babel()).pipe(chmod(0o755)).pipe(gulp.dest("bin"));
done();
});
gulp.task("lint", () =>
gulp
.src("./lib/**/*.js")
.pipe(
eslint({
fix: true,
}),
)
.pipe(eslint.format())
.pipe(prettier())
.pipe(gulp.dest("./lib/")),
);
gulp.task("watch", () => gulp.watch("./lib/**/*.js", gulp.series(["lint", "scripts"])));
gulp.task("build", gulp.series(["lint", "scripts"]));
gulp.task("default", gulp.series(["build", "watch"]));