cost-of-modules alternatives and similar modules
Based on the "Command-line apps" category.
Alternatively, view cost-of-modules alternatives based on common mentions on social networks and blogs.
-
npkill
List any node_modules ๐ฆ dir in your system and how heavy they are. You can then select which ones you want to erase to free up space ๐งน -
carbon-now-cli
๐จ Beautiful images of your code โ from right inside your terminal. -
themer
๐จ themer takes a set of colors and generates themes for your apps (editors, terminals, wallpapers, and more). -
emoj
Find relevant emoji from text on the command-line :open_mouth: :sparkles: :raised_hands: :horse: :boom: :see_no_evil: -
atmo
:heavy_check_mark: Mock data for your prototypes and demos. Remote deployments to Zeit now. -
discharge
โก๏ธ A simple, easy way to deploy static websites to Amazon S3. -
cash-cli
๐ฐ๐ฐ Convert currency rates directly from your terminal!
Appwrite - The Open Source Firebase alternative introduces iOS support
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of cost-of-modules or a related project?
README
Cost of modules
Find out which of your dependencies is slowing you down
Sponsor
Install
npm install -g cost-of-modules
Usage
Run cost-of-modules
in the directory you are working in.
Options
--less
Show the biggest 10 modules
--yarn
Use yarn instead of npm to install dependencies
--no-install
Skip installation
--include-dev
Include devDependencies as well - for ๐ collaborator experience
Show your support
:star: this repo
Motivation
I recently published a npm module (auto-install) and I wanted to know how many bytes am I making people download before they can use it. Turns out, it was a whopping 30M!
More than space on disk, I want to optimise for install speed - setup is part of the user experience
--
Now, there are 3 things that you can do to make your npm package smaller
Make sure all your workflow tools are in
devDependencies
and not independencies
These include your build tools, testing frameworks, etc. Onlydependencies
get installed when someone installs your package. (That being said, for better collaborator experience, you should optimise for both)Only include the files you need by using
files
in yourpackage.json
or by including a.npmignore
. More on that here.Use packages which do the job and take the least amount of space. For example, I realised that I did not need
yargs
, I only needed their parseryargs-parser
which is much smaller.Bonus: Bundle all your code together and strip out the functions that you don't use - I still have to try this out. This could be the most impactful one.
--
In my case, the big size was because of # 3, the bunch of npm packages that I was using.
You can't fix what you can't measure
With npm 2.x, it was easy to find how much space is each of your dependencies taking. You could just look at the size of each directory in node_modules
With npm 3, the packages are installed in flat manner, so it isn't so straightforward.
That's the reason why I created this tool.
--
Future
I would want to make this tool a pre-publish checklist.
- [x] See the size of your
node_modules
- [ ] Include the size of your files
- [ ] Check if
files
or.npmignore
exists - [ ] Check if there are any
dev dependencies
that are specified asdependencies
(tricky) - [ ] Compare size with the last release. Something like this:
License
MIT ยฉ siddharthkp
*Note that all licence references and agreements mentioned in the cost-of-modules README section above
are relevant to that project's source code only.