https://github.com/pwcong/pnpm-changeset-monorepo
Monorepo demo with PNPM + Changeset
https://github.com/pwcong/pnpm-changeset-monorepo
Last synced: 3 months ago
JSON representation
Monorepo demo with PNPM + Changeset
- Host: GitHub
- URL: https://github.com/pwcong/pnpm-changeset-monorepo
- Owner: pwcong
- License: mit
- Created: 2023-04-13T10:57:51.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-08T09:56:32.000Z (10 months ago)
- Last Synced: 2024-08-08T12:04:50.513Z (10 months ago)
- Language: JavaScript
- Size: 196 KB
- Stars: 0
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PNPM Changesets Monorepo
Demo for Monorepo with PNPM and Changesets.# Initialize Monorepo
1. initialize package.json
```shell
> pnpm init
```2. create `pnpm-workspace.yaml` file
```yaml
packages:
- 'apps/*'
- 'packages/*'
```3. create `.npmrc` file
```config
auto-install-peers=true
strict-peer-dependencies=false
```# Initialize Changesets
1. install [changesets](https://github.com/changesets/changesets) on root
```shell
> pnpm install -w --save-dev @changesets/cli
```2. initialize changesets
```shell
> pnpm changeset init
```# Add Package
1. create `packages` folder
```shell
> mkdir packages
```2. create package
```shell
> npx @modern-js/create@latest packages/[package name]
```# Binarary Package
1. create `bin.js` file
```js
#!/usr/bin/env nodeconst run = require('./').default;
run();
```2. update packages.json
```json
"bin": {
"[binarary name]": "bin.js"
},
```