Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/acolorbright/acb-tools-and-configs
Monorepo of tools and configs used for development
https://github.com/acolorbright/acb-tools-and-configs
lerna monorepo npm
Last synced: about 2 months ago
JSON representation
Monorepo of tools and configs used for development
- Host: GitHub
- URL: https://github.com/acolorbright/acb-tools-and-configs
- Owner: acolorbright
- License: mit
- Created: 2021-04-19T10:26:43.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-11T19:00:08.000Z (about 2 months ago)
- Last Synced: 2024-11-11T20:17:37.823Z (about 2 months ago)
- Topics: lerna, monorepo, npm
- Language: JavaScript
- Size: 2.77 MB
- Stars: 0
- Watchers: 7
- Forks: 2
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# ACB tools
This repo contains ACB's tools and configs used in development
## Installation
```
npm install
```## Usage
For more information see [Lerna documentation](https://lerna.js.org/docs/introduction)
### Adding dependencies
In order to add a local or remote dependency for a specific package run `npm install -w=`
### Removing dependencies
In order to add a local or remote dependency for a specific package run `npm uninstall -w=`
#### Removing dependencies issue
When using linked packages, the method for removing dependencies mentioned here sometimes throws an error. This is a bug in `lerna` that happens because local dependencies get removed from `package-lock.json` which then throws an error when running `npm uninstall`.
The solution to this is deleting the target package's local `package-lock.json`, and then running the aforementioned command.
For more info see the provided links:\
https://github.com/lerna/lerna/issues/1886#issuecomment-718880049 \
https://github.com/lfre/lerna-add-remove-issue### Testing
In order to run eslint tests on all packages run `npx lerna run test`, this runs `npm run test` on each package.
For more info on `lerna run` check [the docs](https://github.com/lerna/lerna/tree/main/libs/commands/run#readme)
### Publishing
To publish all changes run `npx lerna publish`.
Packages are published using [Independent mode](https://lerna.js.org/docs/features/version-and-publish#independent-mode)
You have to be logged into `npm` from within the terminal in order for the changes to be published to the registry.
If this part fails you can retry publishing it by running `npx lerna publish from-package`. It will compare the package versions in `package.json` to the ones in the registry. If they don't match it will trigger the publish.