Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"version": "0.2",
"words": [
"Bynens",
"codeql",
"CSSO",
"Divya",
"endsmoosh",
"Oliff",
"Reinl",
"smoosh",
"smoosher"
],
"language": "en,en-US",
"allowCompoundWords": true,
"ignoreRegExpList": ["\\_\\w+", "\\#\\w+"],
"ignorePaths": [".cspell.json"],
"useGitignore": true
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
node-version: [18.x]
steps:
- uses: actions/checkout@v4
- name: Run tests ${{ matrix.node-version }}
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Check spelling"
on: # rebuild any PRs and main branch changes
push:
branches-ignore:
- "dependabot/**"
pull_request:

permissions:
contents: read

jobs:
spellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: streetsidesoftware/cspell-action@v6
with:
inline: warning
strict: false
incremental_files_only: true
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The HTML5 Boilerplate website is a simple static site:

* The development code is in the [`src/`](src) directory.
* The build process relies on [`gulp`](https://gulpjs.com/).
* The `gulp` tasks can be found in the [`gulpfile.js`](gulpfile.mjs)
* The `gulp` tasks can be found in the [`gulpfile.mjs`](gulpfile.mjs)
file.

## Setup
Expand Down
4 changes: 2 additions & 2 deletions docs/index.html

Large diffs are not rendered by default.

33 changes: 15 additions & 18 deletions gulpfile.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import gulpHTMLMin from 'gulp-htmlmin';
import gulpRename from 'gulp-rename';
import gulpReplace from 'gulp-replace';
import gulpRework from 'gulp-rework';
import gulpSmoosher from 'gulp-smoosher';
import gulpUnCSS from 'gulp-uncss';
import gulpSmoosher from "gulp-smoosher";
import gulpUseRef from 'gulp-useref';
import reworkNpm from 'rework-npm';
import { createRequire } from 'module';
Expand Down Expand Up @@ -73,16 +72,14 @@ function copyMisc() {
}).pipe(gulp.dest(dirs.dist));
}
function generateMainCSS() {
return gulp.src(dirs.src + '/css/index.css')
return gulp
.src(dirs.src + "/css/index.css")
.pipe(gulpRework(reworkNpm()))
.pipe(gulpAutoprefixer())
.pipe(gulpCSSBase64())
.pipe(gulpUnCSS({
html: [dirs.src + '/index.html']
}))
.pipe(gulpCSSO())
.pipe(gulpRename('main.css'))
.pipe(gulp.dest(dirs.src + '/css/'));
.pipe(gulpRename("main.css"))
.pipe(gulp.dest(dirs.src + "/css/"));
}

function lintJS() {
Expand Down Expand Up @@ -112,7 +109,7 @@ function minifyHTML() {
};

return gulp
.src([dirs.dist + "/index.html"])
.src([dirs.dist + '/index.html'])
.pipe(gulpSmoosher())
.pipe(gulpHTMLMin(htmlminOptions))
.pipe(gulp.dest(dirs.dist));
Expand All @@ -121,24 +118,24 @@ function browserSyncFn() {
browserSyncOptions.server = dirs.src;
browserSync(browserSyncOptions);

gulp.watch([dirs.src + "/**/*.html"], reload);
gulp.watch([dirs.src + '/**/*.html'], reload);

gulp.watch(
[
dirs.src + "/css/**/*.css",
dirs.src + "/img/**/*",
"!" + dirs.src + "/css/main.css",
dirs.src + '/css/**/*.css',
dirs.src + '/img/**/*',
'!' + dirs.src + '/css/main.css',
],
gulp.series(generateMainCSS)
);

gulp.watch([dirs.src + "/js/**/*.js", "gulpfile.mjs"], gulp.parallel(reload));
gulp.watch([dirs.src + '/js/**/*.js', 'gulpfile.mjs'], gulp.parallel(reload));
}

gulp.task("serve", gulp.series(generateMainCSS, browserSyncFn));
gulp.task('serve', gulp.series(generateMainCSS, browserSyncFn));

gulp.task(
"build",
'build',
gulp.series(
gulp.parallel(cleanBefore),
generateMainCSS,
Expand All @@ -151,8 +148,8 @@ gulp.task(
);

gulp.task(
"serve:build",
gulp.series("build", function () {
'serve:build',
gulp.series('build', function () {
browserSyncOptions.server = dirs.dist;
browserSync(browserSyncOptions);
})
Expand Down
Loading
Loading