Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serve command not rendering marko templates #181

Open
haikyuu opened this issue Feb 3, 2021 · 1 comment
Open

Serve command not rendering marko templates #181

haikyuu opened this issue Feb 3, 2021 · 1 comment

Comments

@haikyuu
Copy link

haikyuu commented Feb 3, 2021

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.

@haikyuu
Copy link
Author

haikyuu commented Feb 5, 2021

It works fine when you install @marko/serve as an npm package and run marko-serve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant