]> gerrit.simantics Code Review - simantics/district.git/blob - npm/lib/utils/read-local-package.js
Hide "enabled" column for non-component type tech type tables
[simantics/district.git] / npm / lib / utils / read-local-package.js
1 exports = module.exports = readLocalPkg
2
3 var npm = require("../npm.js")
4   , readJson = require("read-package-json")
5
6 function readLocalPkg (cb) {
7   if (npm.config.get("global")) return cb()
8   var path = require("path")
9   readJson(path.resolve(npm.prefix, "package.json"), function (er, d) {
10     return cb(er, d && d.name)
11   })
12 }