Sublime Text package to run tradeship, which automatically imports missing JS dependencies and removes unused ones.
Ensure you have tradeship installed:
$ npm install -g tradeship
# or use yarn:
$ yarn global add tradeship
Navigate to your Sublime Text packages directory:
- OS X:
~/Library/Application Support/Sublime Text 3/Packages
- Linux:
~/.Sublime Text 3/Packages
- Windows:
%APPDATA%/Sublime Text 3/Packages
If you're using Sublime Text 2, replace 3 with 2 in the paths above.
Then clone this repository:
git clone https://github.com/karthikv/tradeship-sublime.git
.
To run tradeship, you may either:
- Open the command palette super + shift + p and type "tradeship"
- Press ctrl + alt + i
- To run on save, go to settings (Preferences > Package Settings > tradeship >
Settings - Default) and set
import_on_save
totrue
.
You may also add
custom key bindings
for the tradeship
command.
The first time tradeship runs in a project directory with many JavaScript files, it'll take some time to parse and cache dependencies. Future runs will be much faster.