Use lerna/nx cache for build steps

Repository details (talkie)
Project page
talkie
Project log category
(708 entries)
Repository
@joelpurra/talkie
Owner
@joelpurra
Contributors
Contributors on Github
Project status
⏲️ This project has had recent commits.
📂 This project is open.
🌠 This project is popular.
Repository activity period
🗓
Commits
751 commits
Stars
71 stars
Commit details (adcf4a92)
Author
Authored at
Committer
Joel Purra
Committed at

Commit message

Use lerna/nx cache for build steps

  • Caches per-package files for build and reconstruct steps.
    • Mainly concerns the output in dist/ directories.
    • Relies on the inferred package build order.
  • Cached output is stored by hash.
    • The hash depends on source files, TALKIE_ENV, node --version, etcetera.
    • The custom inputs in nx.json may need to be tweaked to correctly separate (and therefore "invalidate") cached files.
  • Cached output expires after one week.
    • Use npx nx reset to manually clear on-disk caches.
    • See NX_CACHE_DIRECTORY, defaulting to ./node_modules/.cache/nx.

See

Raw text
Use lerna/nx cache for build steps

- Caches per-package files for `build` and `reconstruct` steps.
  - Mainly concerns the output in `dist/` directories.
  - Relies on the inferred package build order.
- Cached output is stored by hash.
  - The hash depends on source files, `TALKIE_ENV`, `node --version`, etcetera.
  - The custom `inputs` in `nx.json` may need to be tweaked to correctly separate (and therefore "invalidate") cached files.
- Cached output expires after one week.
  - Use `npx nx reset` to manually clear on-disk caches.
  - See `NX_CACHE_DIRECTORY`, defaulting to `./node_modules/.cache/nx`.

See

- https://nx.dev/recipes/adopting-nx/lerna-and-nx
- https://lerna.js.org/docs/concepts/task-pipeline-configuration
- https://lerna.js.org/docs/features/cache-tasks
- https://nx.dev/recipes/running-tasks/customizing-inputs

Changed files (30)

Path Additions Deletions
DEVELOP.md +20 -3
code/.gitignore +2 -1
code/lerna.json +1 -0
code/nx.json +71 -0
code/package-lock.json +8644 -7108
code/package.json +7 -5
code/packages/all-renderer/package.json +0 -1
code/packages/browser-background/package.json +0 -1
code/packages/browser-localeredirect/package.json +0 -1
code/packages/browser-runtime-dependencies/package.json +0 -1
code/packages/browser-shared/package.json +0 -1
code/packages/browser-stayalive/package.json +0 -1
code/packages/options-application/package.json +0 -1
code/packages/options-renderer/package.json +0 -1
code/packages/output-webext-chrome/package.json +0 -1
code/packages/output-webext-webextension/package.json +0 -1
code/packages/output-webext/package.json +3 -3
code/packages/popup-application/package.json +0 -1
code/packages/popup-renderer/package.json +0 -1
code/packages/renderer/package.json +0 -1
code/packages/shared-application-helpers/package.json +0 -1
code/packages/shared-application/package.json +0 -1
code/packages/shared-interfaces/package.json +0 -1
code/packages/shared-locales/package.json +2 -2
code/packages/shared-resources/package.json +4 -1
code/packages/shared-ui/package.json +0 -1
code/packages/split-environment-interfaces/package.json +0 -1
code/packages/split-environment-node/package.json +0 -1
code/packages/split-environment-webextension/package.json +0 -1
code/packages/translator-tool/package.json +0 -1

Commit categories (3)