Skip to content

Commit

Permalink
Additional tasks lifecycle hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
rarous committed Oct 23, 2024
1 parent 8b9b745 commit 5635bde
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@

- Updated to Vite.js 6
- Removed Sass from `stylesheets` pipeline. If you need Sass, use `gulp-sass` via `stylesheets.alternateTask`.
- Removed BrowserSync in favor of Vite.js. If you need BrowserSync, use it as Vite plugin.
- Removed BrowserSync in favor of Vite.js. If you need [BrowserSync, use it as Vite plugin](https://github.com/Applelo/vite-plugin-browser-sync).
- Removed WorkBox. We will provide separate package with WorkBoxRegistry, that can be used via `additionalTasks`.
- Removed `gulp-notify` dependency.
- Cleaned and pinned dependencies, so the overall package size after installation is much smaller (>50% reduction).
- `gulp-mode` is now resolved just once and injected into Registries for later use.
- Path config is in `mjs` instead of JSON. JSON config is still supported, but migration to ESM encouraged.
- Support for `mjs` collection files for injection into HTML or generators input. Support for JSON is kept, but ESM is favored.
- Added `posthtml` step for additional tasks

## 8.7.1

Expand Down
11 changes: 6 additions & 5 deletions gulpfile.js/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,20 @@ function devTasks() {
const cloudflarePages = taskConfig.cloudflare ? "cloudflare-pages" : null;
const generate = taskConfig.generate ? "generate" : null;
const staticFiles = taskConfig.static ? "static" : null;
const { prebuild, postbuild, code, assets } = taskConfig.additionalTasks.development;
const { prebuild, postbuild, code, assets, posthtml } = taskConfig.additionalTasks.development;

if (assets) assetTasks.push(...assets);
if (code) codeTasks.push(...code);

return [
"clean",
prebuild && gulp.series(prebuild),
cloudflarePages,
prebuild && gulp.series(prebuild),
generate,
assetTasks && gulp.parallel(assetTasks),
codeTasks && gulp.parallel(codeTasks),
html,
posthtml && gulp.series(posthtml),
staticFiles,
postbuild && gulp.series(postbuild),
"watch"
Expand All @@ -96,20 +97,20 @@ function prodTasks() {
const cloudflarePages = taskConfig.cloudflare ? "cloudflare-pages" : null;
const generate = taskConfig.generate ? "generate" : null;
const staticFiles = taskConfig.static ? "static" : null;
const { prebuild, postbuild, code, assets } =
taskConfig.additionalTasks.production;
const { prebuild, postbuild, code, assets, posthtml } = taskConfig.additionalTasks.production;

if (assets) assetTasks.push(...assets);
if (code) codeTasks.push(...code);

return [
"clean",
prebuild && gulp.series(prebuild),
cloudflarePages,
prebuild && gulp.series(prebuild),
generate,
assetTasks && gulp.parallel(assetTasks),
codeTasks && gulp.parallel(codeTasks),
html,
posthtml && gulp.series(posthtml),
rev,
staticFiles,
postbuild && gulp.series(postbuild),
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hckr_/blendid",
"version": "9.0.0-beta.9",
"version": "9.0.0-beta.12",
"description": "A full featured configurable front-end asset pipeline and static site builder",
"license": "MIT",
"main": "gulpfile.js/index.mjs",
Expand Down

0 comments on commit 5635bde

Please sign in to comment.