gronke/web-modules build

Vendor npm + transform TS + compile SCSS + render index.html (import map injected) into dist/. Pure Rust, no Node.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Activelast commit Jul 8, 2026
License
MIT

Pinned Snippet

workflow.ymlSHA-pinned
uses: gronke/web_modules@72824d81c656a84c2a64796a890ffdedb6b6dbfb # v0.5.1

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
srcSource directory (TypeScript, SCSS, HTML and other static files).noweb
outOutput (dist) directory.nodist
mountURL prefix the vendored modules are served at. For a GitHub *project* page served under /<repo>/, pass /<repo>/web_modules.no/web_modules
packagesSpace-separated package specs to vendor, e.g. "lit@^3 bootstrap@^5". Optional when `manifest` is set.no""
manifestA package.json file - or a directory containing one - whose `dependencies` are also vendored.no""
htmlInline index.html; the literal {importmap} is replaced with the import-map <script>. Keep entry scripts RELATIVE (./app.js) so the page works under a subpath. Leave empty for the built-in default, or set `template` to render a Tera template instead.no""
templateA Tera template file (rendered with an `importmap` variable) used instead of `html`.no""
minifyMinify the emitted JS (true/false).nofalse
gzipWrite .gz sidecars next to assets (true/false). The released binary includes the `compress` feature, so this works.nofalse
reject-presetWhich reject presets keep config / secret / source paths — and keys / certificates / database dumps — out of the built output, e.g. `all` (the default), `all,!config`, `source,hidden,secrets`, or `none`. Empty uses the binary's `all` default.no""
reject-listSpace-separated explicit reject patterns (`*.ext`, `name/`, or an exact `name`) that fully replace the presets, e.g. ".env .git/ *.php". Empty leaves the presets in effect.no""
versionWhich released `web-modules` to download (a version like 0.3 / 0.3.1, a tag like v0.3.1, or `edge`). Empty (default): the release matching the action tag you pinned when it is an exact version (`uses: …@v0.3.1` → the v0.3.1 binary, reproducible), otherwise the latest release (e.g. pinning `@v0`, a branch, or a commit SHA). Ignored when `from-source: true`. The action refuses a downloaded binary older than its CLI contract (currently >= 0.4.0).no""
from-sourceBuild `web-modules` from this action's own source tree with cargo instead of downloading a prebuilt binary (needed on platforms without a published binary, or to build an exact ref). No build cache is bundled — wrap the action with actions/cache on ~/.cargo if you want one.nofalse
namedescription
distPath to the built dist directory (echoes `out`).