mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-03 04:10:04 +02:00
update packages to latest version
This commit is contained in:
22
node_modules/npm/bin/read-package-json.js
generated
vendored
Normal file
22
node_modules/npm/bin/read-package-json.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
var argv = process.argv
|
||||
if (argv.length < 3) {
|
||||
console.error("Usage: read-package.json <file> [<fields> ...]")
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
var fs = require("fs")
|
||||
, file = argv[2]
|
||||
, readJson = require("read-package-json")
|
||||
|
||||
readJson(file, function (er, data) {
|
||||
if (er) throw er
|
||||
if (argv.length === 3) console.log(data)
|
||||
else argv.slice(3).forEach(function (field) {
|
||||
field = field.split(".")
|
||||
var val = data
|
||||
field.forEach(function (f) {
|
||||
val = val[f]
|
||||
})
|
||||
console.log(val)
|
||||
})
|
||||
})
|
Reference in New Issue
Block a user