Babel Plugin for autopletion.
Transform
function a() {
return <Button>A</Button>;
}
To
import { Button } from 'antd-mobile';
function a() {
return <Button>A</Button>;
}
npm install --save-dev babel-plugin-auto-completion
.babelrc
{
"plugins": ["auto-completion"]
}
babel script.js --plugins auto-completion
require("babel-core").transform("code", {
plugins: ["auto-completion"]
});
string
, defaults to ""
.
xxx
string
, defaults to "lib"
.
xxx
boolean
, defaults to true
.
xxx
string/boolean
, defaults to false
, "less" "css" true"
.
xxx
string/ [string]
, defaults to []
xxx