fixed fonts problem
This commit is contained in:
parent
addd3d29de
commit
b67613c721
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
node_modules
|
||||
dist
|
||||
build
|
4
.prettierrc
Normal file
4
.prettierrc
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"tabWidth": 2,
|
||||
"filepath": "*.{js, html}"
|
||||
}
|
22
gulpfile.js
22
gulpfile.js
@ -42,6 +42,14 @@ gulp.task("images", function () {
|
||||
.pipe(connect.reload());
|
||||
});
|
||||
|
||||
// Fonts
|
||||
gulp.task("fonts", function () {
|
||||
return gulp
|
||||
.src(["./fonts/**"], { removeBOM: false })
|
||||
.pipe(gulp.dest("./dist/fonts"))
|
||||
.pipe(connect.reload());
|
||||
});
|
||||
|
||||
gulp.task("html", function () {
|
||||
return gulp
|
||||
.src("./index.html")
|
||||
@ -65,10 +73,13 @@ gulp.task("html", function () {
|
||||
// Clean
|
||||
gulp.task("clean", function () {
|
||||
return gulp
|
||||
.src(["dist/css", "dist/js", "dist/images", "dist/index.html"], {
|
||||
read: false,
|
||||
allowEmpty: true,
|
||||
})
|
||||
.src(
|
||||
["dist/css", "dist/js", "dist/images", "dist/index.html", "dist/fonts"],
|
||||
{
|
||||
read: false,
|
||||
allowEmpty: true,
|
||||
}
|
||||
)
|
||||
.pipe(clean());
|
||||
});
|
||||
|
||||
@ -76,7 +87,7 @@ gulp.task("clean", function () {
|
||||
gulp.task(
|
||||
"default",
|
||||
gulp.series("clean", async function minifyAll() {
|
||||
return gulp.parallel("styles", "scripts", "images", "html")();
|
||||
return gulp.parallel("styles", "scripts", "images", "html", "fonts")();
|
||||
})
|
||||
);
|
||||
|
||||
@ -96,6 +107,7 @@ gulp.task("watch", function () {
|
||||
gulp.watch("./js/*.js", gulp.series("scripts"));
|
||||
gulp.watch("./images/**/*", gulp.series("images"));
|
||||
gulp.watch("./index.html", gulp.series("html"));
|
||||
gulp.watch("./fonts/**/*", gulp.series("fonts"));
|
||||
});
|
||||
|
||||
gulp.task("dev", gulp.series("default", gulp.parallel("connect", "watch")));
|
||||
|
Loading…
Reference in New Issue
Block a user