Giter VIP home page Giter VIP logo

js2dart's People

Contributors

vojtajina avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

js2dart's Issues

Rewrite js2dart in ES6...

... so you could compile js2dart using js2dart to Dart, so you could compile it back to JS and use it to compile JS to Dart, then compile is back and run it :)

constructor and typed field semantics

  1. Only allow assignments to fields in constructor and translate these assignment into constructor initializers
  2. Make field declaration explicit through @field annotation
  3. Make const constructors in Dart through @const annotation

Example:

class Annotation {
  @field('final name:String')
  @field('final age:int')
  @const constructor(name:String, age:int) {
    this.name = 'Hello ' + name;
    this.age = age + 0;
  }
}

@Annotation('usage')
class Foo {}

this needs to transpile to:

class Annotation {
  final String name;
  final int age;
  const Annotation(String name, int age): 
     name = 'Hello ' + name,
     age = age + 0;
}

@Annotation('usage')
class Foo {}

Support conversion of Polymer elements from javascript to Dart

This tool is awesome, please continue developing it. Porting libraries would be a breeze. But can it also help converting Polymer elements from javascript to Polymer.Dart, including HTML templates? That would require to add some semantic conversion on top of the syntactic, but it would be worthwile. Please consider this.

Usage information

How is this used? For instance, I have a .js file I'd like to convert to a .dart file. Is this what this tool is for? If so, how do I run/use it?

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.