Skip to content

Commit ef82348

Browse files
committed
fix: format complex changes
Formats all the general js files. Separate in case these should be treated differently for any reason. This commit includes all javascript and HTML files.
1 parent bc3e778 commit ef82348

15 files changed

+1117
-1109
lines changed

gulpfile.js

+37-30
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,44 @@
1-
const gulp = require('gulp');
2-
const htmlmin = require('gulp-htmlmin');
3-
const htmlclean = require('gulp-htmlclean');
4-
const version = require('gulp-version-number');
5-
const terser = require('gulp-terser');
1+
const gulp = require("gulp");
2+
const htmlmin = require("gulp-htmlmin");
3+
const htmlclean = require("gulp-htmlclean");
4+
const version = require("gulp-version-number");
5+
const terser = require("gulp-terser");
66

77
// Compress js files
8-
gulp.task('js', function () {
9-
return gulp.src(['./public/js/main.js'])
10-
.pipe(terser({
11-
compress: true
12-
}))
13-
.pipe(gulp.dest('./public/js'));
8+
gulp.task("js", function () {
9+
return gulp
10+
.src(["./public/js/main.js"])
11+
.pipe(
12+
terser({
13+
compress: true,
14+
}),
15+
)
16+
.pipe(gulp.dest("./public/js"));
1417
});
1518

16-
1719
// Build html files
18-
gulp.task('html', function () {
19-
return gulp.src('./public/**/*.html')
20-
.pipe(htmlclean())
21-
.pipe(htmlmin({
22-
removeComments: true,
23-
minifyJS: true,
24-
minifyCSS: true,
25-
minifyURLs: true,
26-
}))
27-
.pipe(version({
28-
'append': {
29-
'key': '_v',
30-
'cover': 1,
31-
'to': ['css', 'js', 'png', 'jpg', 'woff2']
32-
}
33-
}))
34-
.pipe(gulp.dest('./public'));
20+
gulp.task("html", function () {
21+
return gulp
22+
.src("./public/**/*.html")
23+
.pipe(htmlclean())
24+
.pipe(
25+
htmlmin({
26+
removeComments: true,
27+
minifyJS: true,
28+
minifyCSS: true,
29+
minifyURLs: true,
30+
}),
31+
)
32+
.pipe(
33+
version({
34+
append: {
35+
key: "_v",
36+
cover: 1,
37+
to: ["css", "js", "png", "jpg", "woff2"],
38+
},
39+
}),
40+
)
41+
.pipe(gulp.dest("./public"));
3542
});
3643

37-
gulp.task('default', gulp.parallel('js', 'html'));
44+
gulp.task("default", gulp.parallel("js", "html"));

postcss.config.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
module.exports = {
2-
plugins: {
3-
'postcss-import': {path: 'themes/coo/source/css'},
4-
'tailwindcss': {config: './tailwind.config.js'},
5-
'autoprefixer': {},
6-
'postcss-minify':{},
7-
}
8-
};
2+
plugins: {
3+
"postcss-import": { path: "themes/coo/source/css" },
4+
tailwindcss: { config: "./tailwind.config.js" },
5+
autoprefixer: {},
6+
"postcss-minify": {},
7+
},
8+
};

0 commit comments

Comments
 (0)