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

startover

v1.1.4

Published

Rerun scripts on file changes

Downloads

3

Readme

Startover

Hey, this is fresh, but essentially it's a little command line tool that will let you watch for file changes and run specific commands when files are changed , not just node commands, suggestions, bugs reports, and feature requests welcome

note this will run any system commands

Installing Startover

We can install Startover globally from NPM

npm i -g startover

Run Startover

We can run startover once it is installed with the following command

startover -d myapp -f hello.js,"bye world.html" -e css,md -c "npm run build" -D test,

It is important to remember that the command/commands we are running from the -c option must be compatible with the system/shell we are running startover in and they will run one after the other

Available Options

The application help information can be found with

startover --help

Or is as follows

Options:
  -V, --version                                       output the version number
  -d, --watch-dirs [directories]                      List of directories to watch, by default will watch current directory
  -c, --commands [commands]                          List of Commands to run when files change
  -f, --exclude-files [files to exclude]              List of Files to Exclude from Watch
  -e, --exclude-extensions [extensions to exclude]    List of Extensions to Exclude from Watch
  -D, --exclude-directories [directories to exclude]  List of Directories to Exclude from Watch
  -a, --run-async                                     Run commands asynchronously [false]
  -h, --help                                          output usage information

Specifying Commands

Long Running Processes

For long running processes that need to be run in the background we can make use of forever, we can add the following scripts to our package.json, for example, or even define them separately

Synchronous

By default the processes will run synchronously in the order in which you define them

package.json

  "scripts": {
    "start": "node app/server.js",
    "build": "browserify public/main.js -o public/bundle.js",
    "forever-start": "forever start app/server.js",
    "forever-stop": "forever stopall"
  },

command line

startover -D docs,node_modules -f hello.js,yes.html -e html,md -c "npm run forever-stop","npm run build","npm run forever-start"

Asynchronous

We can make use of the -a flag to run processes asynchronously as follows, which will run each command specified as a different child process

startover -D docs,node_modules -f hello.js,yes.html -e html,md -c "npm run forever-stop","npm run build","npm run forever-start" -a

Combining Async and Sync

If we need to run some processes synchronously (like stopping our server and then restarting it) but others asynchronously (like managing server processes on a separate thread to compiling a website) we can do it by separating commands that need to run synchronously with <command 1> && <command 2>

startover -D docs,node_modules -f hello.js,yes.html -e html,md -c "npm run forever-stop && npm run forever-start","npm run build" -a

Running Dev

Clone the GitHub Repo, and then install the app dependencies and install the application globally

npm i
npm i -g

Next we can link NPM to our actual package instead of the global version with

npm link

Resources

I've made use of a few different resources for the application as follows

Articles

Libraries