@eljs/create-plugin-npm-package
v1.0.0-beta.1
Published
NPM package scaffold (Node / Web library) powered by @eljs/generator.
Readme
@eljs/create-plugin-npm-package
English | 简体中文
Generate Node or Web libraries with shared TypeScript, lint, test, build, and release tooling.
Usage
npx @eljs/generator @eljs/create-plugin-npm-package my-packageUse Node.js >=22.18.0 and @eljs/generator starting at 2.0.0-beta.6.
Repository Modes
| Mode | Output | | -------- | ----------------------------------------------------------------------------------------------------------------------------- | | Polyrepo | One Node or Web library, ESM/CJS builds and declarations; a Node library may include a single-command or multiple-command CLI | | Monorepo | Shared workspace and tooling; library packages are created later with an explicit environment |
In a generated monorepo:
pnpm package:create packages/my-library --description "My library" --env node
pnpm package:create packages/web-library --description "Web library" --env web--env node|web is required. The selected package manager controls the generated command syntax; use npm run instead of pnpm for npm projects.
Configuration
The package combines @eljs/create-preset-base-package with its own question plugin through create.config.ts. The preset owns shared configuration and rendering. Maintain library source in the generated src directory.
Development
pnpm --filter @eljs/create-plugin-npm-package devThe plugin publishes TypeScript source and templates. Verify changes with the repository's contract tests and tarball checks before releasing.
