Stop committing the generated hugoautogen workspace#473
Merged
Conversation
54d4f9d to
a323a9a
Compare
a179213 to
604cda4
Compare
- Stops committing `packages/hugoautogen/package.json` — `hugo mod npm pack` generates it to aggregate the theme's npm deps (Bootstrap, Font Awesome), so a committed copy is just generated noise that can drift. - Adds `install:all` (`npm install && hugo mod npm pack && npm install`) to regenerate the manifest on demand, and routes every from-scratch build path through it, since a bare `npm install` silently prunes the theme deps (exit 0, no error) when the manifest is absent: - CI (`links.yaml`) installs via `npm run install:all`; this drops the old `--omit=optional`, so the links job now also installs the optional dev deps (`prettier`, `npm-check-updates`) — a deliberate, negligible cost for one canonical build path. - Netlify (`netlify.toml`) prefixes both build commands with it. - README lists it as a prerequisite for running the site locally. - An echo notes that the double install exists only because Hugo, which runs the pack, is itself an npm dependency. - Ignores the generated `packages/hugoautogen/` directory. - Simplifies the freshness guard `check:generated` to `_diff:fail` now that no generated file is committed; it still guards the committed `.lycheecache`.
604cda4 to
de6ec7b
Compare
ac77c72 to
b9cd328
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
packages/hugoautogen/package.json—hugo mod npm packgenerates it to aggregate the theme's npm deps (Bootstrap, Font Awesome), so a committed copy is just generated noise that can drift.install:all(npm install && hugo mod npm pack && npm install) to regenerate the manifest on demand, and routes every from-scratch build path through it, since a barenpm installsilently prunes the theme deps (exit 0, no error) when the manifest is absent:links.yaml) installs vianpm run install:all; this drops the old--omit=optional, so the links job now also installs the optional dev deps (prettier,npm-check-updates) — a deliberate, negligible cost for one canonical build path.netlify.toml) prefixes both build commands with it.packages/hugoautogen/directory.check:generatedto_diff:failnow that no generated file is committed; it still guards the committed.lycheecache.node_modules, lockfile, and generated dir removed):install:all→build→test:site→ offline link check all pass, and both CI and the Netlify deploy preview build green.