You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This extension will display inline in the editor the size of the imported package.
The extension utilizes webpack in order to detect the imported size.
Hit F5 to run the vscode-import-cost extension in debug mode
Applying changes
Thanks to npm workspaces, we have a symbolic link in the vscode-import-cost node modules folder to the local import-cost, which makes applying changes very easy. You can verify that link exists by running the following command:
$ ls -la packages/vscode-import-cost/node_modules | grep import-cost
lrwxr-xr-x 1 shahar staff 17 Aug 6 09:38 import-cost -> ../../import-cost
If anything goes wrong and link does not exist, just run the following commands at the root of this project and npm will sort it out:
$ git clean -xdf
$ npm install
After you make any changes to the import-cost node module, don't forget to trigger transpilation in order to see those changes when running the vscode-import-cost extension:
$ npm test
Publishing changes
When you are ready to publish a new version of the extension, you first need to publish a new version of import-cost (unless nothing changed there). This is done by first commiting all your changes, then simply run the following commands:
$ cd packages/import-cost
$ npm version patch | minor | major
$ git commit -a -m "releasing version X.X.X"
$ git push
$ npm publish
Then go ahead and release the extension with almost same steps (except for last one):
$ cd packages/vscode-import-cost
$ npm version patch | minor | major
$ git commit -a -m "releasing version X.X.X"
$ git push
$ vsce publish
Don't forget to update README.md with details of what is new in the released version...
About
displays the import size of the package you are importing inside the code editor