A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/npm/npm/commit/82df7bb16fc29c47a024db4a8c393e55f883744b below:

Warn if running `npm build` without args and with a build script · npm/npm@82df7bb · GitHub

This repository was archived by the owner on Aug 11, 2022. It is now read-only.

File tree Expand file treeCollapse file tree 1 file changed

+17

-8

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+17

-8

lines changed Original file line number Diff line number Diff line change

@@ -43,14 +43,23 @@ function build (args, global, didPre, didRB, cb) {

43 43

global = npm.config.get('global')

44 44

}

45 45 46 -

// it'd be nice to asyncMap these, but actually, doing them

47 -

// in parallel generally munges up the output from node-waf

48 -

var builder = build_(global, didPre, didRB)

49 -

chain(args.map(function (arg) {

50 -

return function (cb) {

51 -

builder(arg, cb)

52 -

}

53 -

}), cb)

46 +

if (!args.length) {

47 +

readJson(path.resolve(npm.localPrefix, 'package.json'), function (er, pkg) {

48 +

if (!args.length && pkg && pkg.scripts && pkg.scripts.build) {

49 +

log.warn('build', '`npm build` called with no arguments. Did you mean to `npm run-script build`?')

50 +

}

51 +

cb()

52 +

})

53 +

} else {

54 +

// it'd be nice to asyncMap these, but actually, doing them

55 +

// in parallel generally munges up the output from node-waf

56 +

var builder = build_(global, didPre, didRB)

57 +

chain(args.map(function (arg) {

58 +

return function (cb) {

59 +

builder(arg, cb)

60 +

}

61 +

}), cb)

62 +

}

54 63

}

55 64 56 65

function build_ (global, didPre, didRB) {

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4