"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/npm/lib/config/cmd-list.js" (8 Mar 2017, 1804 Bytes) of archive /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Javascript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 var extend = Object.assign || require('util')._extend
    2 
    3 // short names for common things
    4 var shorthands = {
    5   'un': 'uninstall',
    6   'rb': 'rebuild',
    7   'list': 'ls',
    8   'ln': 'link',
    9   'i': 'install',
   10   'it': 'install-test',
   11   'up': 'update',
   12   'c': 'config',
   13   's': 'search',
   14   'se': 'search',
   15   'unstar': 'star', // same function
   16   'tst': 'test',
   17   't': 'test',
   18   'ddp': 'dedupe',
   19   'v': 'view',
   20   'run': 'run-script'
   21 }
   22 
   23 var affordances = {
   24   'la': 'ls',
   25   'll': 'ls',
   26   'verison': 'version',
   27   'isntall': 'install',
   28   'dist-tags': 'dist-tag',
   29   'apihelp': 'help',
   30   'find-dupes': 'dedupe',
   31   'upgrade': 'update',
   32   'login': 'adduser',
   33   'add-user': 'adduser',
   34   'author': 'owner',
   35   'home': 'docs',
   36   'issues': 'bugs',
   37   'info': 'view',
   38   'show': 'view',
   39   'find': 'search',
   40   'unlink': 'uninstall',
   41   'remove': 'uninstall',
   42   'rm': 'uninstall',
   43   'r': 'uninstall'
   44 }
   45 
   46 // these are filenames in .
   47 var cmdList = [
   48   'install',
   49   'install-test',
   50   'uninstall',
   51   'cache',
   52   'config',
   53   'set',
   54   'get',
   55   'update',
   56   'outdated',
   57   'prune',
   58   'pack',
   59   'dedupe',
   60 
   61   'rebuild',
   62   'link',
   63 
   64   'publish',
   65   'star',
   66   'stars',
   67   'tag',
   68   'adduser',
   69   'logout',
   70   'unpublish',
   71   'owner',
   72   'access',
   73   'team',
   74   'deprecate',
   75   'shrinkwrap',
   76 
   77   'help',
   78   'help-search',
   79   'ls',
   80   'search',
   81   'view',
   82   'init',
   83   'version',
   84   'edit',
   85   'explore',
   86   'docs',
   87   'repo',
   88   'bugs',
   89   'root',
   90   'prefix',
   91   'bin',
   92   'whoami',
   93   'dist-tag',
   94   'ping',
   95 
   96   'test',
   97   'stop',
   98   'start',
   99   'restart',
  100   'run-script',
  101   'completion'
  102 ]
  103 
  104 var plumbing = [
  105   'build',
  106   'unbuild',
  107   'xmas',
  108   'substack',
  109   'visnup'
  110 ]
  111 module.exports.aliases = extend(extend({}, shorthands), affordances)
  112 module.exports.shorthands = shorthands
  113 module.exports.affordances = affordances
  114 module.exports.cmdList = cmdList
  115 module.exports.plumbing = plumbing