Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/libotony/babel-plugin-transform-bluebird-co
replace promise with bluebird and co with co-bluebird
https://github.com/libotony/babel-plugin-transform-bluebird-co
Last synced: 13 days ago
JSON representation
replace promise with bluebird and co with co-bluebird
- Host: GitHub
- URL: https://github.com/libotony/babel-plugin-transform-bluebird-co
- Owner: libotony
- Created: 2016-08-05T07:55:40.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-08-29T04:09:58.000Z (over 8 years ago)
- Last Synced: 2024-12-09T09:58:51.250Z (about 1 month ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/babel-plugin-transform-bluebird-co
- Size: 4.88 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
babel-plugin-transform-bluebird-co
---replace [co](https://github.com/tj/co) with [bluebird-co(high performace co)](https://github.com/novacrazy/bluebird-co) 、
replace [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) with [bluebird](https://github.com/petkaantonov/bluebird#readme) plugin.This plugin is aiming to transform base `Promise、async/await、co` to high performace `Bluebird、Bluebird.coroutine、bluebird-co`.So the suggest usage is use this plugin along with `transform-async-to-module-method`;
Installation
---
```bash
npm install bluebird bluebird-co --save
npm install babel-plugin-transform-bluebird-co babel-plugin-transform-async-to-module-method --save-dev
```## Usage
### Via `.babelrc` (Recommended)
**.babelrc**
```json
{
"plugins": [
"transform-bluebird-co",
[
"transform-async-to-module-method",
{
"module": "bluebird-co",
"method": "coroutine"
}]
]
}
```Development
---
Requirement global
* NodeJS v5.11.0
* Npm v3.8.6```bash
git clone https://github.com/libotony/babel-plugin-transform-bluebird-co
cd babel-plugin-transform-bluebird-co
npm installnpm test
```
Thanks
---
[babel-plugin-transform-bluebird](https://github.com/59naga/babel-plugin-transform-bluebird)License
---
MIT