package
Standalone build of Babili (babel-minify) for use in non-Node.js environments
npm install babili-standaloneGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
babili-standalone is a standalone build of Babili for use in non-Node.js environments, including browsers.
It's true that using Babel (and Babili) through Webpack, Browserify or Gulp should be sufficient for most use cases. However, there are some valid use cases for babel-standalone:
There are several ways to get a copy of Babili. Pick whichever one you like:
bower install babili-standalonenpm install --save babili-standalonebabili.js and/or babili.min.js from the GitHub releases page. Every release includes these files.Load babili.js or babili.min.js in your environment, along with Babel-standalone. This is important: You need to load Babel too!
This will load Babili's Babel plugins and preset, and expose a simple API in a Babili object:
var input = 'class Foo { constructor(bar) { this.bar = bar } }; new Foo()';
var output = Babili.transform(input).code;
// class a{constructor(b){this.bar=b}};new a;daniel15
npm@dan.cx