title: Extract package.json version using shell script
body: <p>I'm trying to extract the value of the version field in package.json from the build.sh file. Is there a way to do this? Looks like i can use the below to do the extraction, but what if node is not available globally where i execute the build.sh file so looking for a generic way to exact the value from package.json into build.sh file.</p>
  <pre><code>VERSION=$(node -e &quot;(function () { console.log(require('./package.json').version) })()&quot;)
  </code></pre>