mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-30 22:34:10 -05:00
24 lines
855 B
JavaScript
Executable file
24 lines
855 B
JavaScript
Executable file
#!/usr/bin/env node
|
|
|
|
var commander = require('commander');
|
|
|
|
commander
|
|
// re-inventing the wheel because I don't want to require package.json for every run
|
|
.option('-V, --version', 'output the version number')
|
|
.on('version', get_version)
|
|
|
|
.option('-p, --port <port>', 'port number to listen on (default: 4873)', 4873)
|
|
.option('-s, --storage <path>', 'path to package cache (default: "~/.npmrepod")')
|
|
// todo: need something to do with invalid https certificate, but we just can't use http by default
|
|
.option('-u, --uplink <url>', 'parent registry (default: "https://registry.npmjs.org/")')
|
|
.option('-c, --config <file>', 'use this configuration file')
|
|
|
|
.parse(process.argv);
|
|
|
|
function get_version() {
|
|
console.log(require('../package.json').version);
|
|
process.exit(0);
|
|
}
|
|
|
|
console.log('This thing doesn\'t work yet! Come back in a few weeks...');
|
|
|