-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
43 lines (35 loc) · 1.09 KB
/
gulpfile.js
File metadata and controls
43 lines (35 loc) · 1.09 KB
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
const gulp = require("gulp");
const gap = require("gulp-append-prepend");
const purgecss = require("gulp-purgecss");
const license = `
=========================================================
* @ 2025 Independent Learning Platform
=========================================================
* Landing Page: https://www.ilplatform.be
* Coded by Daniel Cortild
=========================================================
`;
gulp.task("licenses", async () => {
gulp
.src("build/static/js/*chunk.js", { base: "./" })
.pipe(gap.prependText(`/*! ${license} */`))
.pipe(gulp.dest("./", { overwrite: true }));
gulp
.src("build/index.html", { base: "./" })
.pipe(gap.prependText(`<!-- ${license} -->`))
.pipe(gulp.dest("./", { overwrite: true }));
gulp
.src("build/static/css/*chunk.css", { base: "./" })
.pipe(gap.prependText(`/*! ${license} */`))
.pipe(gulp.dest("./", { overwrite: true }));
});
gulp.task("purgecss", () => {
return gulp
.src("src/**/*.css")
.pipe(
purgecss({
content: ["src/**/*.html"],
}),
)
.pipe(gulp.dest("build/"));
});