{"_id":"cmd-shim-hotfix","_rev":"222681","name":"cmd-shim-hotfix","description":"Used in npm for command line application support","dist-tags":{"latest":"3.0.3"},"maintainers":[{"name":"fengmk2","email":"fengmk2@gmail.com"}],"time":{"modified":"2021-06-03T15:40:56.000Z","created":"2019-12-07T14:10:47.318Z","3.0.3":"2019-12-07T14:10:47.318Z"},"users":{},"repository":{"type":"git","url":"git+https://github.com/cnpm/cmd-shim.git"},"versions":{"3.0.3":{"name":"cmd-shim-hotfix","version":"3.0.3","description":"Used in npm for command line application support","scripts":{"test":"tap test/*.js --100","snap":"TAP_SNAPSHOT=1 tap test/*.js --100","preversion":"npm test","postversion":"npm publish","postpublish":"git push origin --follow-tags"},"repository":{"type":"git","url":"git+https://github.com/cnpm/cmd-shim.git"},"license":"ISC","dependencies":{"graceful-fs":"^4.1.2","mkdirp":"~0.5.0"},"devDependencies":{"rimraf":"~2.2.8","tap":"^12.7.0"},"gitHead":"4b5c04dbdd173613c54a9a7c290669ac1dc201de","bugs":{"url":"https://github.com/cnpm/cmd-shim/issues"},"homepage":"https://github.com/cnpm/cmd-shim#readme","_id":"cmd-shim-hotfix@3.0.3","_nodeVersion":"12.13.1","_npmVersion":"6.9.0","_npmUser":{"name":"fengmk2","email":"fengmk2@gmail.com"},"dist":{"shasum":"f46a073b74538199330683ad985a5912f8430dea","size":4242,"noattachment":false,"key":"/cmd-shim-hotfix/-/cmd-shim-hotfix-3.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/cmd-shim-hotfix/download/cmd-shim-hotfix-3.0.3.tgz"},"maintainers":[{"name":"fengmk2","email":"fengmk2@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cmd-shim-hotfix_3.0.3_1575727847132_0.2048406785898096"},"_hasShrinkwrap":false,"publish_time":1575727847318,"_cnpm_publish_time":1575727847318}},"readme":"# cmd-shim\n\nThe cmd-shim used in npm to create executable scripts on Windows,\nsince symlinks are not suitable for this purpose there.\n\nOn Unix systems, you should use a symbolic link instead.\n\n[![Build Status](https://img.shields.io/travis/npm/cmd-shim/master.svg)](https://travis-ci.org/npm/cmd-shim)\n[![Dependency Status](https://img.shields.io/david/npm/cmd-shim.svg)](https://david-dm.org/npm/cmd-shim)\n[![NPM version](https://img.shields.io/npm/v/cmd-shim.svg)](https://www.npmjs.com/package/cmd-shim)\n\n## Installation\n\n```\nnpm install cmd-shim\n```\n\n## API\n\n### cmdShim(from, to, cb)\n\nCreate a cmd shim at `to` for the command line program at `from`.\ne.g.\n\n```javascript\nvar cmdShim = require('cmd-shim');\ncmdShim(__dirname + '/cli.js', '/usr/bin/command-name', function (err) {\n  if (err) throw err;\n});\n```\n\n### cmdShim.ifExists(from, to, cb)\n\nThe same as above, but will just continue if the file does not exist.\nSource:\n\n```javascript\nfunction cmdShimIfExists (from, to, cb) {\n  fs.stat(from, function (er) {\n    if (er) return cb()\n    cmdShim(from, to, cb)\n  })\n}\n```\n","_attachments":{},"homepage":"https://github.com/cnpm/cmd-shim#readme","bugs":{"url":"https://github.com/cnpm/cmd-shim/issues"},"license":"ISC"}