Code Monkey home page Code Monkey logo

js2js's Introduction

About the project

There are dozens of tools that compile some programming language to JavaScript. You can do it with C++, Java, C#, Python, Scala or Ruby. But there's one language that remains to be covered for JavaScript to dominate the world: JavaScript.

We did it. Meet js2js, a revolutionary compiler that transforms JavaScript directly to JavaScript!

Features

  • Control. You have full control over every single bit of the code produced by js2js. You can even compile an invalid JavaScript program to an equally invalid one.
  • Zero overhead. js2js will never slow you down. The compiled code has exactly the same performance as the original input.
  • Integration. js2js rocks with any other JavaScript technology out there: AngularJS, Emscripten, Vanilla JS, jQuery, CoffeeScript, TypeScript, and even Dart.
  • Cross-platform. js2js-powered code supports all kinds of stationary and mobile devices and Web browsers. Even if you develop for Netscape 2.0, we've got you covered.

Usage

For first-time usage, fetch the dependencies:

$ cd js2js
$ npm install

To compile your code, use the following command:

node js2.js -i <input_file_or_directory> -o <output_file_or_directory>

Interesting fact: you can compile the code of js2js with js2js and everything will work as expected. Check this out:

>node js2.js -i js2.js -o js2.compiled.js -v
Welcome to js2js compiler.
Compiling js2.js...
Output is written to: js2.compiled.js
Done!

Options

  • --decompile: decompile js2js-powered JS back to original JS.
  • --force: overwrite existing files in the destination location.
  • --verbose: toggle detailed output.

Technology

js2js is written in JavaScript and runs on Node.js. It is also available as an NPM package: js2js.

How can I contribute?

You can fork the project, make your changes and send us pull requests. Or just share it with your friends and make some JavaScript fun together with js2js.

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.