1.0.4 • Published 3 years ago

@foresightyj/lazy-git v1.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

This command helps in case where you do not want to run a time-consuming command (e.g. a webpack build which takes a few minutes) if git repository does not have new commits.

Usage is pretty similar to cross-env, simply prefix your actual command with lazy-git, e.g.

cross-env NODE_ENV=production lazy-git webpack --config webpack.prod.js

The first time it runs

$ npm run build:prod
> cross-env NODE_ENV=production lazy-git webpack --config webpack.prod.js

.lazy-git does not exist. It will be made after a successful run.
...
...
webpack 5.37.1 compiled with 2 warnings in 38225 ms
Successfully ran: `webpack --config webpack.prod.js`. Save the corresponding commit hash: 23240f7 style change to .lazy-git

The second time it runs (assuming no new commits):

$ npm run build:prod
> cross-env NODE_ENV=production lazy-git webpack --config webpack.prod.js

Command: `webpack --config webpack.prod.js` is SKIPPED because .lazy-git already has last commit: `23240f7 style change`
To re-run the command, simply delete the file: `D:\Working\FHT.CMS.Web\fht-cms-web-client\.lazy-git` and then retry.

Later, if new commits detected:

/d/Working/FHT.CMS.Web/fht-cms-web-client $ npm run build:prod

cross-env NODE_ENV=production lazy-git webpack --config webpack.prod.js

New commit detected: d2d2506 applied lazy-git ... ... webpack 5.37.1 compiled with 2 warnings in 38496 ms Successfully ran: webpack --config webpack.prod.js. Save the corresponding commit hash: d2d2506 applied lazy-git to .lazy-git ...

1.0.2

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago