Nutin
● v3.0.0Framework structure. Vanilla freedom.
First steps
Create a project
npx @nutin/cli my-app
Run the project
cd my-app
npm run serve # port 9090
Start building
Generate a new component
npm run generate component components/hello-world
Make the component say hello
<!-- components/hello-world/hello-world.component.html -->
<div>Hello, world!</div>
Register the component
// views/home/home.view.ts
import { HelloWorldComponent } from '../../components/hello-world/hello-world.component.js';
class HomeView extends View {
/* ... */
registerChildren(): Nutin.ComponentConfig[] {
return [
{
selector: 'hello',
factory: (el) => new HelloWorldComponent(el),
}
]
}
}
<!-- views/home/home.view.html -->
<!-- ... -->
<div data-component="hello"></div>
See it running
npm run dev # port 9090 - watch mode