move important cli usage to top
This commit is contained in:
parent
b194461ba3
commit
a302d4562f
14
README.md
14
README.md
@ -43,6 +43,7 @@
|
|||||||
- [Brunch](https://github.com/es128/6to5-brunch)
|
- [Brunch](https://github.com/es128/6to5-brunch)
|
||||||
- [Gulp](https://github.com/sindresorhus/gulp-6to5)
|
- [Gulp](https://github.com/sindresorhus/gulp-6to5)
|
||||||
- [Grunt](https://github.com/sindresorhus/grunt-6to5)
|
- [Grunt](https://github.com/sindresorhus/grunt-6to5)
|
||||||
|
- Sprockets
|
||||||
|
|
||||||
## [Features](FEATURES.md)
|
## [Features](FEATURES.md)
|
||||||
|
|
||||||
@ -71,6 +72,10 @@ To be implemented:
|
|||||||
|
|
||||||
### CLI
|
### CLI
|
||||||
|
|
||||||
|
Compile the file `script.js` and output it to stdout.
|
||||||
|
|
||||||
|
$ 6to5 script.js
|
||||||
|
|
||||||
Compile the file `script.js` and output it to `script-compiled.js`.
|
Compile the file `script.js` and output it to `script-compiled.js`.
|
||||||
|
|
||||||
$ 6to5 script.js -o script-compiled.js
|
$ 6to5 script.js -o script-compiled.js
|
||||||
@ -79,10 +84,6 @@ Compile the entire `src` directory and output it to the `lib` directory.
|
|||||||
|
|
||||||
$ 6to5 src -d lib
|
$ 6to5 src -d lib
|
||||||
|
|
||||||
Compile the file `script.js` and output it to stdout.
|
|
||||||
|
|
||||||
$ 6to5 script.js
|
|
||||||
|
|
||||||
#### Node
|
#### Node
|
||||||
|
|
||||||
Launch a repl.
|
Launch a repl.
|
||||||
@ -141,9 +142,8 @@ to5.transform("code();", {
|
|||||||
|
|
||||||
#### Require hook
|
#### Require hook
|
||||||
|
|
||||||
All subsequent files required by node will be transformed into ES5 compatible
|
All subsequent files required by node will be transformed by 6to5. An ES6
|
||||||
code. An ES6 polyfill is also required negating the
|
polyfill is also required negating the [polyfill caveat](#polyfill).
|
||||||
[polyfill caveat](#polyfill).
|
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
require("6to5/register");
|
require("6to5/register");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user