Skip to content

Serve command not rendering marko templates #181

@haikyuu

Description

@haikyuu

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions