【文件属性】:
文件名称:babel-plugin-remove-decorator:Babel 6插件,删除了所有装饰器
文件大小:28KB
文件格式:ZIP
更新时间:2021-04-30 12:58:14
javascript decorators removes-decorators JavaScript
babel-plugin-remove-decorator
Babel 6插件可删除所有装饰器,在运行单元测试时非常有用
从*类中删除装饰器,例如:
前:
@ MyDecorator
class Content { }
后:
class Content { }
对于项目的任何进一步改进,我都会很高兴接受PR!
用法
$ npm install --save-dev babel-plugin-remove-decorator
$ yarn add --dev babel-plugin-remove-decorator
添加到您的babelrc:
{
" env " : {
" test " : {
" plugins " : [ " remove-decorator " ]
}
}
}
【文件预览】:
babel-plugin-remove-decorator-master
----yarn.lock(95KB)
----index.test.js(2KB)
----.babelrc(36B)
----.circleci()
--------config.yml(193B)
----README.md(725B)
----.gitignore(23B)
----index.js(588B)
----package.json(588B)