npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

live-npm-update

v1.0.199

Published

Instantly update your own npm modules src into your current working project, skipping publishing and updating it on every minimal change in npm sources.

Downloads

1

Readme

Instantly update your own npm modules src into your current working project, skipping publishing and updating it on every minimal change in npm sources.

why

If you are an experienced npm package creator, you use your own npm modules intensively and update your modules often, you might have encountered a problem that every time you need to change in one of your own modules quickly - you need to publish it on every smallest change, to be able to use it in the project you are working on. It makes you reluctant making small changes.

In the ideal world, that would be great if every time you change a tiny thing in your npm project sources - something magically and automatically would update the same npm module to the npm_modules folder in the project you're currently working on...

And here it is!

just install this package in the project you are working on, create the config, where you list your own npm projects paths and "npmnpm" will watch all changes you make in your far npm module source folder and update it right away! No need to npm publish it every time you changes something.

Now that it's so easy, you will spend less time waiting and allow yourself experiment more with your own npm modules, since it can be done so effortlessly.

install

npm -i -D live-npm-update

usage example

Imagine your name is Tobias and you have a couple of your own npm modules you created, they are located at

  • home/tobias/my_npm/incredible_icons
  • home/tobias/my_npm/cool_math

and also you use them in your JS project at

home/games/tobi_pacman

Of course, his npm modules must be published at npmjs.com and then he should install them normally into tobi_pacman folder by doing npm i -S incredible_icons and npm i -S cool_math, they are added to package.json and traditionaly sit in Pacman's node_modules.

Now, in the middle of development of his pacman, Tobias discover that npm module cool_math has a bug in cool.lerp() function. It a small change from - to + in the code, but once he changed it, to use it in Pacman project, he needs to:

  • run npm test in cool_math, wait
  • run npm publish
  • wait 2 minutes just to see the warning you forgot to change the version number
  • fix the version number, publish again
  • go to tobi_pacman and run npm i -S cool_math@latest
  • wait until it downloads and updates
  • continue working

Isn't it crazy? Now, let's see how NOT to do this with the help of live-npm-update:

  • he installs npm -i -D live-npm-update, once
  • he creates .live-npm-update.json file in the Pacman's root once
  • adds the following:
{
    "npmSrcRoots":[
      "home/tobias/my_npm/"// a path to the root folder of npm sources of modules, created by me. 
      /// since all my node module sources are kept in the same folder - no need to list each of them.
    ],
    // if I don't keep my "node_modules" in Pacman's root folder, I need to add 
    // a variable here:
    "myNodeModulesRoot":"../"/// this means "my node_modules folder is one level above the project". The default value is "./" (same folder)
}
  • then he added this line to his Pacman's package.json scripts section:
  ...
  "watch-npm":"live-npm-update"
  ...

And now Tobias can start the npm watch-npm once, and he knows, that every time he makes even the smallest change in his cool_math sources - once he switches back to continue developing Pacman - the updated module is already there in node_modules.

Of course, if he performed enough changes in cool_math for bigger release - he will do the npm publish as usual. That's said - live-npm-update made the life of Tobias easier.