Coder Social home page Coder Social logo

isabella232 / import-cost Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wix/import-cost

0.0 0.0 0.0 2.97 MB

displays the import size of the package you are importing inside the code editor

Home Page: https://marketplace.visualstudio.com/items?itemName=wix.vscode-import-cost

License: MIT License

Shell 0.12% JavaScript 89.61% TypeScript 10.27%

import-cost's Introduction

Import Cost Build Status Stand With Ukraine

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.

Example Image

This project includes implementation of:

Enjoy!

Third-Party Editor Plugin Links

Why & How

We detail the why and how in this blog post: https://citw.dev/posts/import-cost

Developer guidelines

In this project we use npm workspaces for managing the multiple packages.

Getting started

In order to start working all you need to do is:

$ git clone [email protected]:wix/import-cost.git
$ npm install
$ code packages/import-cost
$ code packages/vscode-import-cost

Once VSCode workspaces are open:

  • Hit F5 to run tests in import-cost
  • 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...

import-cost's People

Contributors

yairhaimo avatar shahata avatar yazshel avatar ranyitz avatar leeor avatar sthuck avatar giladartzi avatar tomashubelbauer avatar dependabot[bot] avatar alexkrolick avatar denysdovhan avatar hiramhuang avatar ipatalas avatar jakehedman avatar jamiebuilds avatar tbremer avatar yardnsm avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.