The official compiler for SweetWeb (.sw) - A domain-specific language for rapid full-stack web development.
npm install sweetweb-cliThe official command-line compiler for SweetWeb (.sw).
``bash`
npm install -g sweetweb-cli
bash
sweetweb new my-app
cd my-app
`$3
`bash
sweetweb build site.sw
`This will compile your
.sw files into a dist/ folder containing standard HTML, CSS, and JS.Syntax Cheat Sheet
$3
- [stack]: Vertical layout (Column)
- [row]: Horizontal layout (Row)
- [grid columns 3]: Grid layout$3
- [js link "utils.js"]: Link external JavaScript
- [css link "style.css"]: Link external CSS
- [js] console.log("Inline") [/js]: Inline Block
- [css] body { background: red } [/css]: Inline Block$3
- [text "Hello"]
- [button "Click Me" link "/about"]
- [input placeholder "Type..."]
- [image "url"]$3
- [view "https://example.com" width "100%" height 500]
- [youtube "VIDEO_ID"]
- [badge "New"]
- [avatar "image_url"]$3
- [api "/user/:id"] ... [/api]: Define serverless functions.
- [api "/py" lang "python"]`: Define Python endpoints.