Skip to content

lijie10502/babel-plugin-transform-bluebird-co

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

babel-plugin-transform-bluebird-co

replace co with bluebird-co(high performace co) 、 replace Promise with bluebird 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

npm install bluebird bluebird-co --save
npm install babel-plugin-transform-bluebird-co transform-async-to-module-method --save-dev

Usage

Via .babelrc (Recommended)

.babelrc

{
  "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
git clone https://github.com/libotony/babel-plugin-transform-bluebird-co
cd babel-plugin-transform-bluebird-co
npm install

npm test

Thanks

babel-plugin-transform-bluebird

License

MIT

About

replace promise with bluebird and co with co-bluebird

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%