Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/deepraining/conv-mod
把 JavaScript 模块从 AMD 或 CommonJs 规范转化为 ES6 规范. Convert JavaScript module from AMD or CommonJs to ES6.
https://github.com/deepraining/conv-mod
amd commonjs convert es6 module tool
Last synced: about 1 month ago
JSON representation
把 JavaScript 模块从 AMD 或 CommonJs 规范转化为 ES6 规范. Convert JavaScript module from AMD or CommonJs to ES6.
- Host: GitHub
- URL: https://github.com/deepraining/conv-mod
- Owner: deepraining
- License: mit
- Created: 2019-08-09T11:55:12.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-08-13T02:07:27.000Z (over 5 years ago)
- Last Synced: 2024-10-16T09:29:45.410Z (2 months ago)
- Topics: amd, commonjs, convert, es6, module, tool
- Language: JavaScript
- Size: 26.4 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.en.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# conv-mod
[中文文档](./README.md)
Convert JavaScript module from AMD or CommonJs to ES6.
## quick start
Install:
```
npm install conv-mod -g
```Usage:
```
conv-mod [options] [extraDirs...]
```## options
- `-f, --filter `: a query string to filter files
- `-r, --regular`: regard query string as regular expression to filter files
- `--amd`: convert AMD modules
- `--cjs`: convert CommonJs modules## currently can not convert
```
const a = require('a').default;
const {a, b} = require('a');
const a, {b, c} = require('a');
```