cjs2esm:将使用CommonJS的项目转换为ES模块

时间:2021-03-07 18:03:27
【文件属性】:
文件名称:cjs2esm:将使用CommonJS的项目转换为ES模块
文件大小:181KB
文件格式:ZIP
更新时间:2021-03-07 18:03:27
nodejs commonjs esmodules JavaScript CJS 2 ESM 将使用CommonJS的项目转换为ES模块。 :memo: 介绍 如果您想知道我为什么要构建此文件,请转到“部分。 您可以使用此工具将使用CommonJS的项目转换为ES Modules,并将其准备好用于Node v14 ,具有ESM支持的任何模块捆绑程序,甚至可以 。 此工具在内部使用进行从的转换,并创建了一个额外的来修复丢失的扩展名。 :high_voltage: 例子 要求 const { Jimpex } = require ( 'jimpex' ) ; const ObjectUtils = require ( 'wootils/shared/objectUtils' ) ; require ( './homer0' ) ; // Becomes import { Jimpex } from 'jimpex' ; import ObjectUtils from 'wootils/sh
【文件预览】:
cjs2esm-master
----.eslintrc(116B)
----.gitattributes(17B)
----utils()
--------scripts()
----.github()
--------PULL_REQUEST_TEMPLATE.md(113B)
--------workflows()
----yarn.lock(392KB)
----src()
--------transformer.js(5KB)
--------utils.js(6KB)
--------bin.js(610B)
--------typedef.js(3KB)
--------index.js(14KB)
----.npmignore(55B)
----.jsdoc.js(1KB)
----LICENSE(1KB)
----.jestrc.js(225B)
----README.md(10KB)
----.husky()
--------commit-msg(137B)
--------pre-commit(135B)
--------post-merge(103B)
--------.gitignore(2B)
----.releaserc(327B)
----.editorconfig(188B)
----tests()
--------.eslintrc(65B)
--------index.test.js(31KB)
--------bin.test.js(4KB)
--------jsconfig.json(55B)
--------transformer.test.js(14KB)
--------utils.test.js(12KB)
----.gitignore(77B)
----CHANGELOG.md(3KB)
----.eslintignore(65B)
----package.json(2KB)
----.nvmrc(3B)

网友评论