babel-plugin-class-properties
v1.0.0
Published
This plugin add class properties
Downloads
35
Maintainers
Readme
babel-plugin-class-properties
Install
$ npm install --save-dev babel-plugin-class-properties
Usage
{
"plugins": [
["babel-plugin-class-properties", {
"all": true,
"props": [{
"key": "name",
"static": true
}, {
"key": "foo",
"value": "2 + 3"
}]
}]
]
}
Options
| Name | Type | Default | Description |
| :--: | :--: | :-----: | :---------- |
| all
| {Boolean}
| false
| Is enabled for all classes |
| classes
| {Array[String]}
| []
| Is enabled for specify classes |
| superClasses
| {Array[String]}
| []
| Is enabled for specify superClasses |
| props
| {Array[Object]}
| []
| Class properties that need to be added |
props
key
:String
(required)value
:String | Function
(default:null
)computed
:Boolean
(default:false
)static
:Boolean
(default:false
)