Compiles any index.partial.html
in src/html/<subdir>/
into the public folder as an HTML file. If the <subdir>
folder is named index, it will create public/index.html
. If it is named anything else, it will create public/<subdir>/index.html
. Directories beginning with the htmlIgnorePrefix
are not built, but changes to files in that folder trigger rebuilds.
You can also configure this task via the simpleHTML
option in config.js
to always create HTML files named after the <subdir>
.
Note: The logic in this task could be further refactored to better handle globs versus single files. Currently, the onEvent-build.js
file handles both the "all" and the "single-file" scenarios. The two onEvent files could also be combined into one controller and different modules like the static task.
cli.js
— Currently just delegates toonEvent-build.js
.config.js
— Templating and file in settings.onEvent-build.js
— Compile HTML templates.onEvent-remove.js
— Remove built HTML pages when you delete a folder insrc/html/<subdir>
.watch.js
— Watch specification.
getHtmlDir.js
— Get the name of the parent directory of a file.
In package.json:
"build:html": "node build/tasks/html/cli.js",
"dev:html": "node build/tasks/html/watch.js"