0.0.4 • Published 2 years ago

change-spy v0.0.4

Weekly downloads
-
License
GNU
Repository
github
Last release
2 years ago

Change Spy

Maintain your file integrity!

Single Page App developers are all to familiar with config files to store application constants. Frequently, you'll have multiply copies of the same key for different environments. For example:

export const API_ENDPOINT="https://myproduction.api.com";
// export const API_ENDPOINT="localhost:3000";

Have you uncommented the localhost endpoint, and then accidentally commit it to the repository? Never again! Change Spy helps maintain file integrity in your projects by tracking a file's content, and then offers actions to verify if it had changed and optionally restore to the cached version of the file. Intended to work with git-hook libraries like Husky.

Installation

npm install change-spy --save-dev

Usage

Track a file (no limit on number of tracked files):

npx spy-init ./path/to/myfile.js

Verify if any tracked files have changed:

npx spy-verify

Restore any changed tracked files to their cached state (the file state when spying started):

npx spy-restore

List all files being spied on:

npx spy-list

Clear list of spied files and stop spying:

npx spy-clear
0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago