node.js - Get the value of another field in package.json file (npm) -
i have following package.json file:
{ "main": "./dist/index.js", "scripts": { "build": "tsc", "build:live": "tsc && node ./dist/index.js" }, ... } how can value of main field, put command node ./dist/index.js, (just example, know $ env variables):
{ "main": "./dist/index.js", "scripts": { "build": "tsc", "build:live": "tsc && node $main" }, ... } thanks in advance
Comments
Post a Comment