JsModules
JsModules is a Sublime Text Plug-in to convert CJS modules to ES modules.
Details
Installs
- Total 376
- Win 233
- Mac 78
- Linux 65
May 6 | May 5 | May 4 | May 3 | May 2 | May 1 | Apr 30 | Apr 29 | Apr 28 | Apr 27 | Apr 26 | Apr 25 | Apr 24 | Apr 23 | Apr 22 | Apr 21 | Apr 20 | Apr 19 | Apr 18 | Apr 17 | Apr 16 | Apr 15 | Apr 14 | Apr 13 | Apr 12 | Apr 11 | Apr 10 | Apr 9 | Apr 8 | Apr 7 | Apr 6 | Apr 5 | Apr 4 | Apr 3 | Apr 2 | Apr 1 | Mar 31 | Mar 30 | Mar 29 | Mar 28 | Mar 27 | Mar 26 | Mar 25 | Mar 24 | Mar 23 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
JsModules
[JsModules] is a Sublime Text Plug-in to convert CJS modules to ES modules.
Installation
[JsModules] is compatible with both Sublime Text 2 and 3, and all supported Operating Systems.
Requirements
- [Sublime Text] - Text editor for code
- [node.js] - JavaScript runtime
- [yarn] or [npm] - Package manager for JavaScript
- [cjs-to-es6] - CLI to convert JavaScript files from CommonJS to ES6 modules
Install cjs-to-es6
If you installed [cjs-to-es6] globally (using the [yarn] or [npm] command below), there's nothing else you need to do.
# using yarn:
yarn global add cjs-to-es6
# using npm:
npm install -g cjs-to-es6
Install JsModules via Package Control
The easiest and recommended way to install JsModules is using [Package Control].
From the main application menu, navigate to:
Tools
->Command Palette...
->Package Control: Install Package
, type the word JsModules, then select it to complete the installation.
Install JsModules Manually
- Download and extract JsModules [zip file] to your [Sublime Text Packages directory].
- Rename the extracted directory from
SublimeJsModules-master
toJsModules
.
Default Sublime Text Packages Paths:
- OS X:
~/Library/Application Support/Sublime Text [2|3]/Packages
- Linux:
~/.Sublime Text [2|3]/Packages
- Windows:
%APPDATA%/Sublime Text [2|3]/Packages
NOTE Replace the
[2|3]
part with the appropriate Sublime Text version for your installation.
Usage
To run the JsModules
command… open the Sublime Text Command Palette
(super + shift + p) and type JsModules: Convert file to ES module.