cli
cli copied to clipboard
Serve command not rendering marko templates
I copy pasted the example of the home page of marko, but it didn't work.
The command I use is npx @marko/serve . or npx @marko/serve index.marko.
class {
onCreate() {
this.state = { count: 0 };
}
increment() {
this.state.count++;
}
}
style {
.count {
color: #09c;
font-size: 3em;
}
.example-button {
font-size: 1em;
padding: 0.5em;
}
}
<div.count>
${state.count}
</div>
<button.example-button on-click("increment")>
Click me!
</button>
Also, consize syntax doesn't work: a simple template like h1 -- hello wouldn't work either.
It works fine when you install @marko/serve as an npm package and run marko-serve