Files: 403bed97ce3c8f93b87fa33b014b7f20e5e5670d / lib / cmds.js
319 bytesRaw
1 | var path = require('path') |
2 | var fs = require('fs') |
3 | |
4 | exports.aliases = { |
5 | 'prs': 'pull-requests' |
6 | } |
7 | |
8 | exports.getCmd = function (cmd) { |
9 | cmd = cmd ? exports.aliases[cmd] || cmd : 'index' |
10 | if (/[:\/]/.test(cmd)) return null |
11 | var file = path.join(__dirname, cmd + '.js') |
12 | if (fs.existsSync(file)) return require(file) |
13 | } |
14 |
Built with git-ssb-web