Code Monkey home page Code Monkey logo

Comments (5)

kbrsh avatar kbrsh commented on June 3, 2024

Yup, this is definitely on the roadmap. If you'd like to build a syntax highlighter then go for it! I'd recommend building one for whichever editor you personally use. Creating a TextMate grammar should extend nicely to most editors. You should be able to build on top of a JSX syntax highlighter. Some differences are:

  1. Moon elements require parenthesis around them.
  2. Property keys can be empty, so you can do <Component="foo"/> and the props would look like { "": "foo" }.
  3. Event handlers use @ as a prefix instead of on.

That's all I can name off of the top of my head, but that's the majority of the difference in regards to syntax.

from moon.

jhechtf avatar jhechtf commented on June 3, 2024

from moon.

kbrsh avatar kbrsh commented on June 3, 2024

There are no plans as of now to use TypeScript within Moon itself, and I may write types for the API — it's lower priority though. Right now I'm focusing on some official drivers, specifically the router and HTTP drivers.

from moon.

jhechtf avatar jhechtf commented on June 3, 2024

from moon.

kbrsh avatar kbrsh commented on June 3, 2024

Yup, type definitions might be added but aren't top priority for now.

If I get something I'll link it on this and submit a pull request to update the docs

That's awesome! Feel free to add it in the "View" section if you end up adding to the docs. If not, I'll be happy to write them as well.

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.