A file watching application restarter for your npm start
command.
- 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.
strt
can be installed locally or globally with either Yarn or npm.
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.
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.
--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
- Fork this repository to your own GitHub account and then clone it to your local device
- Link the package to the global module directory:
npm link
- 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 ofstrt
will now be used.
Released under the MIT license: opensource.org/licenses/MIT