3.0.1 • Published 2 years ago

@olegjs/on-change v3.0.1

Weekly downloads
28
License
ISC
Repository
github
Last release
2 years ago

on-change

npm install size Node.js CI Coverage Status GitHub last commit

CLI tool to run a command if file has changed since the last time that command was run.

Forgetting to run npm i or npm ci every time after git pull or switching between branches and getting Error: Cannot find module...? Add the following to package.json to automate this chore.

"scripts": {
  "prestart": "npx @olegjs/on-change --file package-lock.json npm ci"
}

This CLI tool stores a file checksum in a hidden sha file every time it run a given command. Made to automate running npm ci after pulling modified package-lock.json.

Install

npm install --save-dev @olegjs/on-change

Usage

npx @olegjs/on-change --help

# Usage: on-change --file [file] [command]
#
# Options:
#   --help      Show help                                                [boolean]
#   --version   Show version number                                      [boolean]
#   --file, -f  Path to file to check for changes              [string] [required]
#   --color     Force color or disable with --no-color                   [boolean]
#
# Examples:
#   on-change --file package-lock.json npm    Reinstall dependencies on changed
#   ci                                        package-lock.json
3.0.1

2 years ago

3.0.0

3 years ago

2.0.3

3 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago