JsModules
JsModules is a Sublime Text Plug-in to convert CJS modules to ES modules.
Details
Installs
- Total 372
- Win 230
- Mac 77
- Linux 65
Feb 22 | Feb 21 | Feb 20 | Feb 19 | Feb 18 | Feb 17 | Feb 16 | Feb 15 | Feb 14 | Feb 13 | Feb 12 | Feb 11 | Feb 10 | Feb 9 | Feb 8 | Feb 7 | Feb 6 | Feb 5 | Feb 4 | Feb 3 | Feb 2 | Feb 1 | Jan 31 | Jan 30 | Jan 29 | Jan 28 | Jan 27 | Jan 26 | Jan 25 | Jan 24 | Jan 23 | Jan 22 | Jan 21 | Jan 20 | Jan 19 | Jan 18 | Jan 17 | Jan 16 | Jan 15 | Jan 14 | Jan 13 | Jan 12 | Jan 11 | Jan 10 | Jan 9 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 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 |
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 | 0 | 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.