diff options
author | LinuxWizard42 <computerwizard@linuxmail.org> | 2022-10-12 23:08:57 +0300 |
---|---|---|
committer | LinuxWizard42 <computerwizard@linuxmail.org> | 2022-10-12 23:08:57 +0300 |
commit | 726b81b19251674e149ccfbb1abacbd837fc6db0 (patch) | |
tree | fbdbb227dc01357eb76e8222d76185bc124c5ca6 /node_modules/meow/index.js | |
parent | 34f0890e175698940d49238097579f44e4d78c89 (diff) | |
download | FlashRunner-726b81b19251674e149ccfbb1abacbd837fc6db0.tar.gz FlashRunner-726b81b19251674e149ccfbb1abacbd837fc6db0.tar.zst |
Removed files that should not have been included in git
Diffstat (limited to 'node_modules/meow/index.js')
-rw-r--r-- | node_modules/meow/index.js | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/node_modules/meow/index.js b/node_modules/meow/index.js deleted file mode 100644 index d7ab879..0000000 --- a/node_modules/meow/index.js +++ /dev/null @@ -1,82 +0,0 @@ -'use strict'; -var path = require('path'); -var minimist = require('minimist'); -var objectAssign = require('object-assign'); -var camelcaseKeys = require('camelcase-keys'); -var decamelize = require('decamelize'); -var mapObj = require('map-obj'); -var trimNewlines = require('trim-newlines'); -var redent = require('redent'); -var readPkgUp = require('read-pkg-up'); -var loudRejection = require('loud-rejection'); -var normalizePackageData = require('normalize-package-data'); - -// get the uncached parent -delete require.cache[__filename]; -var parentDir = path.dirname(module.parent.filename); - -module.exports = function (opts, minimistOpts) { - loudRejection(); - - if (Array.isArray(opts) || typeof opts === 'string') { - opts = {help: opts}; - } - - opts = objectAssign({ - pkg: readPkgUp.sync({ - cwd: parentDir, - normalize: false - }).pkg, - argv: process.argv.slice(2) - }, opts); - - minimistOpts = objectAssign({}, minimistOpts); - - minimistOpts.default = mapObj(minimistOpts.default || {}, function (key, value) { - return [decamelize(key, '-'), value]; - }); - - if (Array.isArray(opts.help)) { - opts.help = opts.help.join('\n'); - } - - var pkg = typeof opts.pkg === 'string' ? require(path.join(parentDir, opts.pkg)) : opts.pkg; - var argv = minimist(opts.argv, minimistOpts); - var help = redent(trimNewlines(opts.help || ''), 2); - - normalizePackageData(pkg); - - process.title = pkg.bin ? Object.keys(pkg.bin)[0] : pkg.name; - - var description = opts.description; - if (!description && description !== false) { - description = pkg.description; - } - - help = (description ? '\n ' + description + '\n' : '') + (help ? '\n' + help : '\n'); - - var showHelp = function (code) { - console.log(help); - process.exit(code || 0); - }; - - if (argv.version && opts.version !== false) { - console.log(typeof opts.version === 'string' ? opts.version : pkg.version); - process.exit(); - } - - if (argv.help && opts.help !== false) { - showHelp(); - } - - var _ = argv._; - delete argv._; - - return { - input: _, - flags: camelcaseKeys(argv), - pkg: pkg, - help: help, - showHelp: showHelp - }; -}; |