@yawn-framework/cli
v0.1.0
Published
CLI for scaffolding and running Yawn framework projects
Readme
@yawn/cli
The command-line interface for Yawn framework. Scaffold projects, create components, start dev servers and build sites.
Install
npm install -g yawn-framework
# or with npx:
npx yawn-framework init my-siteCommands
yh init [dir]
Scaffold a new Yawn app.
yh init my-site
cd my-site
npm install
yh devyh dev [dir]
Start the development server. Looks for src/server.ts, src/main.ts (or .js variants) and runs it with tsx.
yh dev .
yh dev ./my-siteyh build [dir]
Build the project. Runs tsc if tsconfig.json is present, otherwise compiles all .yawn files to static HTML in dist/.
yh build .yh create component <Name> [dir]
Scaffold a new .yawn component.
yh create component Hero .
# creates src/components/Hero.yawnyh create site landing [dir]
Scaffold a complete landing-site structure.
yh create site landing my-siteyh insert <file> <ComponentName> [key=value ...]
Insert a component tag into an existing .yawn file before </main>.
yh insert src/page.yawn Hero title="Hello" cta="Start"
# inserts: <con:Hero title="Hello" cta="Start" />