forked from GaurangTandon/ProKeys
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
32 lines (26 loc) · 932 Bytes
/
gulpfile.js
File metadata and controls
32 lines (26 loc) · 932 Bytes
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
const gulp = require("gulp"),
csso = require("gulp-csso"),
htmlmin = require("gulp-htmlmin"),
jsonminify = require("gulp-jsonminify"),
SRC = ".",
DEST = "./dist";
gulp.task("styles", () => gulp
.src(`${SRC}/css/*.css`)
.pipe(csso())
.pipe(gulp.dest(`${DEST}/css`)));
gulp.task("scripts", () => gulp.src([`${DEST}/js/*.js`, `${SRC}/js/editor.min.js`]).pipe(gulp.dest(`${DEST}/js`)));
gulp.task("html", () => gulp
.src(`${SRC}/html/*.html`)
.pipe(
htmlmin({
collapseWhiteSpace: true,
removeComments: true,
}),
)
.pipe(gulp.dest(`${DEST}/html`)));
gulp.task("manifest", () => gulp
.src(`${SRC}/manifest.json`)
.pipe(jsonminify())
.pipe(gulp.dest(DEST)));
gulp.task("images", () => gulp.src(`${SRC}/imgs/*.*`).pipe(gulp.dest(`${DEST}/imgs`)));
gulp.task("default", gulp.series("styles", "scripts", "html", "manifest", "images"));