$ cnpm install pob-babel
Build and watch with babel and typescript
watch
returns an EventEmitter to allow you to restart your server if needed.npm install --save-dev pob-babel
Also install babel plugins and presets
Create .pob.json
{
"react": false,
"envs": ["node6", "webpack", "webpack-modern-browsers"]
}
node_modules/.bin/pob-build
node_modules/.bin/pob-watch
npm run build
Edit your package.json:
{
"scripts": {
"build": "pob-build",
"watch": "pob-watch"
}
}
Copyright 2014 - 2016 © taobao.org |