I have logger which is displaying some stuff in production and i want to add version to this logger so i got better clue if/when deployment is finished. Is it possible to:
That will be really helpful
for the second question if you have access to process you can read the version property of package.json like this:
process.env.npm_package_version
for the first question, that is a little tricky, you can use some packages such as husky to run some npm scripts which you already add to package.json.
so you would listen to git hooks such as commit or merge and using pre- or post- scripts to run a command before or after a hook is fired.
so I guess if you can combine these, you would get your desired result