【文件属性】:
文件名称:babel-plugin-detective:Babel插件,可扫描AST以查找需求调用和导入语句
文件大小:11KB
文件格式:ZIP
更新时间:2021-01-31 02:46:54
nodejs babel babel-plugin ast ava
babel-plugin-detective
Babel 5/6插件,可扫描AST以查找需求调用和导入语句
安装
$ npm install --save babel-plugin-detective babel-core
用法
import babel from 'babel-core' ;
const detective = require ( 'babel-plugin-detective' ) ;
const myModule = require ( 'my' + 'module' ) ;
// See below for available options
const options = { } ;
// Babel 5
// `position` can be 'before' or 'after'
let result = babel . transformFileSync ( path , {
plugins : [ { transformer : detective , position : position } ] ,
extra : {
detecti
【文件预览】:
babel-plugin-detective-master
----.gitignore(34B)
----test()
--------mocha.opts(40B)
--------_utils.js(698B)
--------fixtures()
--------babel-6-test.js(5KB)
--------babel-5-test.js(4KB)
--------register-babel.js(111B)
----.gitattributes(12B)
----wrap-listener.js(2KB)
----package.json(1002B)
----readme.md(6KB)
----index.js(1KB)
----.travis.yml(106B)
----.editorconfig(190B)
----license(1KB)