Skip to content

A file watching application restarter for your 'npm start' command.

Notifications You must be signed in to change notification settings

chrisdwheatley/strt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

strt

A file watching application restarter for your npm start command.

Features

  • Reliable - A development environment matching your production environment by running the same command you do in production (npm start).
  • Fast - Application restarts are super performant thanks to file watching from chokidar.
  • Simple - Offers sensible defaults for node.js applications.
  • Configurable - File watch & ignore patterns can be defined as well as being able to amend the command run.

Usage

strt can be installed locally or globally with either Yarn or npm.

Locally

yarn add strt --dev
npm install strt --dev

Once installed locally add a task to scripts within your package.json;

{
  "main": "index.js",
  "scripts": {
    "dev": "strt",
    "start": "node index.js"
  }
}

Now just run;

npm run dev

To start your application & begin watching for changes.

Globally

yarn global add strt
npm install --global strt

Once installed globally you can run strt on the command line from your application root to start watching for changes.

Options

--command (-c) [value] Command to run on file change (defaults to "npm start")

--files   (-f) [value] Glob pattern of files to watch for changes (defaults to ".")

--help    (-h)         Output usage information

--ignore  (-i) [value] Glob pattern of files to ignore (defaults to "node_modules")

--version (-v)         Output the version number

Contributing

  1. Fork this repository to your own GitHub account and then clone it to your local device
  2. Link the package to the global module directory: npm link
  3. Within the module you want to test your local development instance of strt, just link it to the dependencies: npm link strt. Your local version of strt will now be used.

License

Released under the MIT license: opensource.org/licenses/MIT

About

A file watching application restarter for your 'npm start' command.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published