How to use the read-package-json.cache 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 ShieldBattery / ShieldBattery / deps / node / deps / npm / lib / unbuild.js View on Github external
readJson(path.resolve(folder, "package.json"), function (er, pkg) {
    // if no json, then just trash it, but no scripts or whatever.
    if (er) return rm(folder, cb)
    readJson.cache.del(folder)
    chain
      ( [ [lifecycle, pkg, "preuninstall", folder, false, true]
        , [lifecycle, pkg, "uninstall", folder, false, true]
        , !silent && function(cb) {
            console.log("unbuild " + pkg._id)
            cb()
          }
        , [rmStuff, pkg, folder]
        , [lifecycle, pkg, "postuninstall", folder, false, true]
        , [rm, folder] ]
      , cb )
  })
}}
github racker / node-rproxy / node_modules / cluster2 / node_modules / npm / lib / unbuild.js View on Github external
readJson(path.resolve(folder, "package.json"), function (er, pkg) {
    // if no json, then just trash it, but no scripts or whatever.
    if (er) return rm(folder, cb)
    readJson.cache.del(folder)
    chain
      ( [ [lifecycle, pkg, "preuninstall", folder, false, true]
        , [lifecycle, pkg, "uninstall", folder, false, true]
        , [rmStuff, pkg, folder]
        , [lifecycle, pkg, "postuninstall", folder, false, true]
        , [rm, folder] ]
      , cb )
  })
}
github bower / bower / lib / util / read-json.js View on Github external
var read = module.exports = function (path, cb, obj) {
  readJSON.log = {
    info: function () {},
    verbose: function () {},
    warn: function (what, name, shizzle) {
      if (read.showWarnings) {
        template('warn', { name: name.replace(/@/, '#'), shizzle: shizzle })
          .on('data', obj.emit.bind(obj, 'data'));
      }
    }
  };
  readJSON.cache.reset();
  readJSON(path, cb);
};

read-package-json

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

ISC
Latest version published 6 months ago

Package Health Score

64 / 100
Full package analysis

Similar packages