1.0.1 • Published 11 years ago
webmodules-babel-base v1.0.1
Babel Base Project
Use this project as a base for your ECMAScript6 webmodule projects that use Babel.
Setup instructions
- Clone/copy the contents of this repo to a new folder.
- Fill in your webmodule information in
package.json, replacingYOUR-WEBMODULE-NAMEwith the webmodule name and so on. Make sure you remove the"private": trueline to allownpm publishto work. - Add your code to the root directory.
.jsfiles inside thebuilddirectory are generated by Babel. - Run
maketo build the.jsfiles inside thebuilddir. They're also generated automatically before publishing. (Check theprepublishscript inpackage.json) - Replace this readme with the readme of your webmodule project.
- Push to github, then
npm publish.
Important Remarks
- Do not to commit the generated
.jsfiles insidebuildto Git. - The
babel-runtimedependency is used by babel to polyfill ES6 features and to load helper functions. Given how fast babel is being updated, we've decided to specify only the major version to avoid having webmodules with different runtime versions on the same dependency tree. (Otherwise we'd need to constantly update all ES6 webmodules to follow babel's releases) If that proves to be a problem, (e.g. breakage) we'll change this strategy. - A locally installed copy of babel is used to build, so you don't
need a global
babel(1)tool installed on your system.
Todo
- Add test code / make rules.
License
MIT