【文件属性】:
文件名称:babel-file:轻松创建Babel File对象
文件大小:5KB
文件格式:ZIP
更新时间:2021-01-31 03:26:15
babel babel-util BabelJavaScript
babel文件
轻松创建Babel文件对象
构造File对象
添加/解析错误代码
import createFile from 'babel-file' ;
import createBabylonOptions from 'babylon-options' ;
const file = createFile ( code , {
filename : 'filename.js' ,
parserOpts : createBabylonOptions ( {
stage : 2 ,
} ) ,
} ) ;
file . code ;
file . ast ;
file . path ;
接受与普通Babel File对象。
【文件预览】:
babel-file-master
----.flowconfig(39B)
----yarn.lock(8KB)
----LICENSE(1KB)
----README.md(566B)
----.gitignore(19B)
----index.js(842B)
----package.json(308B)