|
1 | | -[](https://github.com/bokub/lyo/issues/1) |
| 1 | + |
2 | 2 |
|
3 | 3 | > Node.js to browser - The easy way |
4 | 4 |
|
@@ -65,7 +65,15 @@ $ lyo --help |
65 | 65 | ``` |
66 | 66 |
|
67 | 67 |
|
68 | | -## Recommended workflow |
| 68 | +## Tips |
| 69 | + |
| 70 | +- Add a `.babelrc` file at the root of your project to [configure][babel-config] the Babel compilation step |
| 71 | +- The bundle is supposed to run in browsers. A bundle used in a Node.js program will probably be slower than the original module |
| 72 | +- Don't blame Lyo if it fails to compile your code. The error could come from [Browserify][browserify], [Babel][babel] or [UglifyJS][uglify] |
| 73 | +- If you like Lyo, you will love [lyo.now.sh](https://lyo.now.sh/), an automated bot 🤖 running Lyo on npm modules of your choice |
| 74 | + |
| 75 | + |
| 76 | +## Using Lyo on your own module |
69 | 77 |
|
70 | 78 | Once you've tried Lyo on your module and figured the best options to use, you should consider the following steps |
71 | 79 |
|
@@ -105,12 +113,6 @@ It's really up to you. |
105 | 113 | Run `npm publish`, Lyo will compile your module, and the bundle will be pushed to the npm registry with the rest of your module. |
106 | 114 | Congratulations, you're done! 💪 |
107 | 115 |
|
108 | | -### Additional tips |
109 | | - |
110 | | -- Don't use the bundle in a Node.js environment. The bundle is supposed to run in browsers only |
111 | | -- Don't immediately blame Lyo if it fails to compile your code. The error could come from [Browserify][browserify], |
112 | | - [Babel][babel] or [UglifyJS][uglify] |
113 | | - |
114 | 116 |
|
115 | 117 | ## Using Lyo on someone else's module |
116 | 118 |
|
@@ -159,4 +161,5 @@ MIT © [Boris K](https://github.com/bokub) |
159 | 161 |
|
160 | 162 | [browserify]: https://github.com/browserify/browserify |
161 | 163 | [babel]: https://github.com/babel/babel |
| 164 | +[babel-config]: https://babeljs.io/docs/en/configuration |
162 | 165 | [uglify]: https://github.com/mishoo/UglifyJS2 |
0 commit comments