@anarchitects/nx-js
v0.0.2
Published
Anarchitects Nx JS plugin with enhanced secondary entry point support.
Readme
@anarchitects/nx-js
@anarchitects/nx-js extends the official @nx/js plugin to give Rails-inspired Nx monorepos a native JavaScript experience, including first-class secondary entry point generation for libraries.
Installation
yarn add -D @anarchitects/nx-js
# or
npm install -D @anarchitects/nx-jsWhat You Get
- Composition of the standard
@nx/jsgenerators and executors. - A secondary entry point generator that:
- Scaffolds
src/<segment>/index.ts+lib/<segment>.tsfiles. - Updates build targets for supported bundlers (
tsc,swc,rollup,vite). - Leaves
package.jsonexports to your bundler configuration via Nx’sgenerateExportsFieldoption.
- Scaffolds
Usage
Create a library and add secondary entry points:
yarn nx g @anarchitects/nx-js:library my-lib --bundler=tsc
yarn nx g @anarchitects/nx-js:secondary-entry-point --project=my-lib --name=featureBuilding
yarn nx build nx-jsTesting
yarn nx test nx-jsLicense
This project is licensed under the Apache License 2.0.
