Tool to use sparse checkout in big monorepos created using Nrwl/nx, inspired by KwintenP's nx-etc.
Tested to work with the following nrwl/nx versions:
- 8
- 9
- 10
- 11 (only nx-sparse-checkout@^2.0.0)
- 13 (only nx-sparse-checkout@^3.0.0)
- 14 (only nx-sparse-checkout@^14.0.0) -> Aligned version numbers
It lists all apps and libraries in the workspace using nx's technologies. Dependent projects are automatically added to the list of projects to check out, based on nx's dependency graph.
npm install -D nx-sparse-checkout
yarn add -D nx-sparse-checkout
./node_modules/.bin/nx-sparse-checkout
npx nx-sparse-checkout
yarn nx-sparse-checkout
All these parameters are optional
Parameter | Effect |
---|---|
--interactive (-i) | Starts interactive mode (in combination with other parameters) |
--all (-a) | Checks out all projects. Selects all projects in interactive mode |
names... | Checks out those names of projects. If a name is not found, interactive mode is started |
- Install packages in example
- Remove package nx-sparse-checkout
- Update version number of nx-sparse-checkout in package.json
- Do changes in nx-sparse-checkout code
- pnpm build
- pnpm pack
- In example, add devDependency "npm install -D ../nx-sparse-checkout-....tgz"
- Test
- If it works, remove beta tag from package.json
- pnpm build
- npm publish
- Update dependency in example to published version
- Create PR