refactor(Cypress): add nodemodules
This commit is contained in:
29
node_modules/undeclared-identifiers/bin.js
generated
vendored
Executable file
29
node_modules/undeclared-identifiers/bin.js
generated
vendored
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
var concat = require('simple-concat')
|
||||
var undeclared = require('./')
|
||||
|
||||
if (arg('--help') || arg('-h')) {
|
||||
console.log('usage: undeclared-identifiers [--identifiers] [--properties] < source.js')
|
||||
process.exit(0)
|
||||
}
|
||||
|
||||
concat(process.stdin, function (err, src) {
|
||||
if (err) throw err
|
||||
|
||||
var r = undeclared(src)
|
||||
var i = arg('--identifiers') || arg('-i')
|
||||
var p = arg('--properties') || arg('-p')
|
||||
|
||||
if (!i && !p) i = p = true
|
||||
|
||||
if (i) r.identifiers.forEach(log)
|
||||
if (p) r.properties.forEach(log)
|
||||
})
|
||||
|
||||
function arg (s) {
|
||||
return process.argv.indexOf(s) !== -1
|
||||
}
|
||||
function log (n) {
|
||||
console.log(n)
|
||||
}
|
Reference in New Issue
Block a user