Skip to content

Commit

Permalink
template-lib-monorepo support pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
csr632 committed Jul 7, 2022
1 parent cbae11f commit 1c0d318
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 2 additions & 0 deletions packages/create-project/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ async function init() {
const root = path.join(cwd, targetDir)
const renameFiles = {
_gitignore: '.gitignore',
_npmrc: '.npmrc',
'_pnpm-workspace.yaml': 'pnpm-workspace.yaml',
}
console.log(`Scaffolding project in ${root}...`)

Expand Down
8 changes: 4 additions & 4 deletions packages/create-project/template-lib-monorepo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ This project demonstrate how to develop libraries **in monorepo** using vite as

## How to use

`yarn` (require yarn 1.x)
`pnpm install` or `yarn install` (require yarn 1.x)

`cd packages/demos`

`yarn dev` You can play with demos of your packages in local develop environment.
`pnpm run dev` You can play with demos of your packages in local develop environment.

Edit `packages/button/src/index.tsx` or other source files, the demos will inflect your change instantly.
Edit `packages/button/demos/demo1.tsx` or other demo files, the demos will inflect your change instantly.

`yarn build` The demos are built and served.
`pnpm run build` The demos are built and served.

`npm run ssr` The app are built into a static site (Static-Site Generation) and served.
`pnpm run ssr` The app are built into a static site (Static-Site Generation) and served.

---

Expand Down
1 change: 1 addition & 0 deletions packages/create-project/template-lib-monorepo/_npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
public-hoist-pattern[]=*@mdx-js/react*
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
packages:
- "packages/**"

0 comments on commit 1c0d318

Please sign in to comment.