diff --git a/README.md b/README.md index dc9fc09..7652fed 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Installation There are several ways to get a copy of babel-standalone. Pick whichever one you like: -- Use it via CDNJS: https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.7.7/babel.min.js. This is a simple way to embed it on a webpage without having to do any other setup. +- Use it via CDNJS: https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.10.3/babel.min.js. This is a simple way to embed it on a webpage without having to do any other setup. - Install via Bower: `bower install babel-standalone` - Install via NPM: `npm install --save babel-standalone` - Manually grab `babel.js` and/or `babel.min.js` from the [GitHub releases page](https://github.com/Daniel15/babel-standalone/releases). Every release includes these files. @@ -33,4 +33,16 @@ var input = 'const getMessage = () => "Hello World";'; var output = Babel.transform(input, { presets: ['es2015'] }).code; ``` +When loaded in a browser, babel-standalone will automatically compile and execute all script tags with `text/babel` type: +```html +
+ + + + +``` + Note that `.babelrc` doesn't work in babel-standalone, as no file system access is available. The presets and/or plugins to use **must** be specified in the options passed to `Babel.transform`.