-
Notifications
You must be signed in to change notification settings - Fork 4
/
gulpfile.js
67 lines (56 loc) · 1.25 KB
/
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
const gulp = require("gulp");
const elm = require("gulp-elm");
const sass = require("gulp-sass");
const del = require("del");
const clean_dirs = [
"docs/",
"elm-stuff/",
];
const sass_dirs = [
"src/sass/**/*.sass",
"node_modules/bulma/bulma.sass"
];
const css_dirs = [
"node_modules/@creativebulma/bulma-tooltip/dist/bulma-tooltip.css",
"node_modules/@creativebulma/bulma-collapsible/dist/css/bulma-collapsible.min.css"
];
const js_dirs = [
"node_modules/@creativebulma/bulma-collapsible/dist/js/bulma-collapsible.min.js"
];
gulp.task("clean", () => {
return del(clean_dirs);
});
gulp.task("html", () => {
return gulp.src("src/html/**")
.pipe(gulp.dest("docs/"));
});
gulp.task("elm", () => {
return gulp.src("src/elm/Main.elm")
.pipe(elm({ optimize: true }))
.pipe(gulp.dest("docs/js/"));
});
gulp.task("js", () => {
return gulp.src(js_dirs)
.pipe(gulp.dest("docs/js/"));
});
gulp.task("sass", () => {
return gulp.src(sass_dirs)
.pipe(sass())
.pipe(gulp.dest("docs/css/"));
});
gulp.task("css", () => {
return gulp.src(css_dirs)
.pipe(gulp.dest("docs/css/"));
});
gulp.task("default",
gulp.series(
"clean",
gulp.parallel(
"html",
"elm",
"sass",
"css",
"js",
)
)
);