0.1.0 • Published 8 years ago

glossolalia v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 years ago

glossolalia

or: There and Back Again

glossolalia is a JavaScript transpiler that repeatedly transpiles code back and forth between ES5 and ES6.

Ever wonder what your babel output would look like as ES6? Wonder no more!

Shoutout to /u/toqy for the idea!


Installation

# For API usage
npm i -S glossolalia
# For CLI usage
npm i -g glossolalia

CLI

# Example:
glossolalia --output transformed.js original.js
# For more info:
glossolalia --help

API

glossolalia.transform(code, [options]): string

glossolalia.transform(
  code: string,
  options: ?Object = {
    initialSpec: 'es6',
    iterations: 2,
    babel: { presets: ['es2015'] },
    lebab: {
      'class': true,
      'template': true,
      'arrow': true,
      'let': true,
      'default-param': true,
      'arg-spread': true,
      'obj-method': true,
      'obj-shorthand': true,
      'no-strict': true,
      'commonjs': true,
    },
  }
);