git ssb

39+

cel / git-ssb



Tree: 9879cbb757d4bcde4e81cb784c35900a61a22bd6

Files: 9879cbb757d4bcde4e81cb784c35900a61a22bd6 / lib / cmds.js

319 bytesRaw
1var path = require('path')
2var fs = require('fs')
3
4exports.aliases = {
5 'prs': 'pull-requests'
6}
7
8exports.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