1.0.0 • Published 4 years ago

dir-changed.js v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

dir-changed.js

check changes in dir

just touch it

npm i  -g dir-changed.js

dch -h

cd  xxxxxxxx
## test changed
dch
## reset
dch reset

cat .sha256sum.json

dch
# edit some file now
dch

ignore

ignore partly file or dirs changes
make .ignore file just like .gitignore

use in code

npm i dir-changed.js
var dch  = require('dir-changed.js')
(async ()=>{
    // dir is changed
    var isChanged  = await dch.isChanged('yourDirPath' , { ignore : ".git/\r\ndocs/"})
    // here to reset  ( save or commit)
    await dch.reset('yourDirPath' , { ignore : ''})
})()