git ssb

39+

cel / git-ssb



Tree: 873ff04e1eef1fb6e86d5e48cbaf0da8e8ac7dfe

Files: 873ff04e1eef1fb6e86d5e48cbaf0da8e8ac7dfe / lib / cmds.js

333 bytesRaw
1var path = require('path')
2var fs = require('fs')
3
4exports.aliases = {
5 'prs': 'pull-requests'
6}
7
8exports.getCmd = function (cmd, ext) {
9 cmd = cmd ? exports.aliases[cmd] || cmd : 'index'
10 if (/[:\/]/.test(cmd)) return null
11 var file = path.join(__dirname, cmd + '.' + ext)
12 if (fs.existsSync(file)) return file
13 return null
14}
15

Built with git-ssb-web