ChapelR / tweego-setup

A Tweego project boilerplate.
The Unlicense
62 stars 21 forks source link

Favicon HTML not added to output #8

Closed cliffhall closed 5 years ago

cliffhall commented 5 years ago

Currently the modules/favicon.html is presumably supposed to be added to the dist/index.html when running tweegobuild. However it is not added.

After reading the tweego docs for the -m about twenty times, I finally noticed that .html is not a supported extension:

-m SRC, --module=SRC Module sources (repeatable); may consist of supported files and/or directories to recursively search for such files. Each file will be wrapped within the appropriate markup and bundled into the element of the compiled HTML. Supported files: .css, .js, .otf, .ttf, .woff, .woff2.

To insert an HTML snippet into the head of the output file, you need to use --head:

--head=FILE Name of the file whose contents will be appended as-is to the element of the compiled HTML.

By changing the tweegobuild script in package.json it did the right thing:

tweego -f $npm_package_config_format -m src/modules/ --head=src/modules/head.html -o dist/index.html project

Even though it seems redundant, I left the -m src/modules/ in place because if someone wants to add fonts they can do so.

ChapelR commented 5 years ago

Thanks, merged.