@purityjs/cli
v0.1.0
Published
Scaffold a new Purity project
Readme
@purityjs/cli
Scaffold a new Purity project in seconds.
Usage
npx @purityjs/cli my-app
cd my-app
npm install
npm run devWhat It Generates
my-app/
index.html — entry HTML
package.json — dependencies + scripts
tsconfig.json — TypeScript config
vite.config.ts — Vite + @purityjs/vite-plugin
.gitignore
src/
main.ts — counter component exampleGenerated vite.config.ts
import { purity } from '@purityjs/vite-plugin';
import { defineConfig } from 'vite';
export default defineConfig({
plugins: [purity()],
});Generated main.ts
A working counter component demonstrating state, compute, html, css, component, and onMount.
Scripts
| Command | Description |
| ----------------- | ------------------------- |
| npm run dev | Start Vite dev server |
| npm run build | Production build with AOT |
| npm run preview | Preview production build |
Local Development
When run from the Purity monorepo, the CLI automatically:
- Links
@purityjs/coreto the local source - Links
@purityjs/vite-pluginto the local source - Generates a
vite.config.tswith resolve aliases
No need to publish packages for local development.
License
MIT
