How to use the read-package-json function in read-package-json

To help you get started, we’ve selected a few read-package-json examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github linonetwo / hyper-visual / src / context / node.js View on Github external
return new Promise((resolve, reject) => {
    readJSON(`${cwd}/package.json`, console.error, false, (error, data) => {
      if (error) {
        return reject(error);
      }
      console.log(data);
      return resolve(Object.keys(data?.scripts || {}));
    });
  });
}

read-package-json

The thing npm uses to read package.json files with semantics and defaults and validation

ISC
Latest version published 7 days ago

Package Health Score

67 / 100
Full package analysis

Similar packages