npm init -w packages/myapp

Category: Node.js & npm/yarn

npm init -w packages/myapp

Create a new workspace package inside a monorepo at the specified path

Creates a new sub-package at the given path and registers it as a workspace in the root package.json — the start of a monorepo sub-package.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.