Giter VIP home page Giter VIP logo

Comments (2)

jbmonroe avatar jbmonroe commented on May 17, 2024

Let me follow up by saying that production code should never go out with casually-visible comments in it, so a proper dev stack would make sure they're removed--but just in case someone forgets....

from moon.

kbrsh avatar kbrsh commented on May 17, 2024

Hey, you're right, this is a bug in Moon. It has already been fixed in v0.10.0, which will be released soon, I'm aiming for Friday 😄

I made a demo of the issue (being fixed) with a development build of v0.10.0.

If I could get the data used in your demo, I could provide you with a working version that will work with v0.10.0.

I just have to update the docs, as some of the syntax and scoping has changed. For example, all directives will now be rendered as if they were in a mustache:

<div id="app">
  <h1 style="color: {{color}}" m-if="condition">Condition is {{condition}}</h1>
</div>

As you can see, the directive uses a syntax as if it were inside of a mustache, and a normal attribute uses mustache syntax. Along with this, mustaches will be able to have a valid Javascript expression. (That's right! Moon has a built in Javascript tokenizer that can analyze dependencies, in ~100 bytes!)

You will be able to do something like:

<div id="app">
  <h1>{{num * 10}}</h1>
</div>

By the way, Moon will remove all comments that are parsed, so if you open Developer Tools, you'll see the comment be removed.

from moon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.