Lines Matching +full:pkg +full:- +full:config
14 var fs = require('graceful-fs')
16 var readJson = require('read-package-json')
17 var binLinks = require('bin-links')
18 var binLinksConfig = require('./config/bin-links.js')
20 var writeFile = require('write-file-atomic')
38 global = npm.config.get('global')
42 readJson(path.resolve(npm.localPrefix, 'package.json'), function (er, pkg) { argument
43 if (!args.length && pkg && pkg.scripts && pkg.scripts.build) {
44 … log.warn('build', '`npm build` called with no arguments. Did you mean to `npm run-script build`?')
50 // in parallel generally munges up the output from node-waf
66 readJson(path.resolve(folder, 'package.json'), function (er, pkg) { argument
69 !didPre && [lifecycle, pkg, 'preinstall', folder],
70 [linkStuff, pkg, folder, global],
71 !didRB && [rebuildBundles, pkg, folder],
72 [writeBuiltinConf, pkg, folder],
73 didPre !== build._noLC && [lifecycle, pkg, 'install', folder],
74 didPre !== build._noLC && [lifecycle, pkg, 'postinstall', folder]
81 var writeBuiltinConf = build.writeBuiltinConf = function (pkg, folder, cb) {
82 // the builtin config is "sticky". Any time npm installs
83 // itself globally, it puts its builtin config file there
88 if ((pkg.name !== 'npm' && pkg.name !== 'npmc') ||
89 !npm.config.get('global') ||
90 !npm.config.usingBuiltin ||
95 var data = ini.stringify(npm.config.sources.builtin.data)
99 var linkStuff = build.linkStuff = function (pkg, folder, global, cb) {
101 if (npm.config.get('bin-links') === false) return cb()
102 return binLinks(pkg, folder, global, binLinksConfig(pkg), cb)
105 function rebuildBundles (pkg, folder, cb) { argument
106 if (!npm.config.get('rebuild-bundle')) return cb()
108 var deps = Object.keys(pkg.dependencies || {})
109 .concat(Object.keys(pkg.devDependencies || {}))
110 var bundles = pkg.bundleDependencies || pkg.bundledDependencies || []
122 return !file.match(/^[._-]/) &&
124 file.indexOf('@') === -1 &&
126 (deps.indexOf(file) === -1 || bundles.indexOf(file) !== -1)