cincheo / jsweet

A Java to JavaScript transpiler.
http://www.jsweet.org
Other
1.46k stars 158 forks source link

How to Learn the Principle of jsweet and Add New feature? #536

Closed alamhubb closed 4 years ago

alamhubb commented 5 years ago

Hello, I want to learn the principles of jsweet and try to add some new feature. What should I do? I want to write jsweet like Vue for js.

Create a new file format in which you can write both HTML and Java and CSS.

Like this D:\Hello.jsweet ,A new file format called jsweet

<template>
    <div id="hello">
        {{hello}}
    </div>
</template>

<java>
public class HelloWorld extends JavaView{
    private String hello = "hello world";
}
</java>

<style scoped lang="scss">
 #id{
    font-size:36px;
}
</style>

Then compile the file into JS and HTML and CSS through maven

But I don't know how to start. I read doc, but I haven't found anything about the principle. Can you tell me how to start learning jsweet principle and where to learn jsweet principle? Thank you.

lgrignon commented 5 years ago

Hello, First of all let me tell you that I think this is a great idea, there is AFAIK no such thing existing. This will however require a huge work to do so. It would be great to write your runtime in JSweet so you could interact with existing JS tools such as vue.js, mustache js If you want to learn about JSweet, the first place to look is http://www.jsweet.org/ More specifically, you will find:

I think the following may also be very useful for you: