1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-10-08 10:15:14 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

create package with hash

This commit is contained in:
tdzl2003
2016-02-23 18:49:53 +08:00
parent 8b887383c6
commit 9ecd7133c5
4 changed files with 84 additions and 49 deletions

View File

@@ -21,22 +21,9 @@ const commands = {
help: printUsage,
};
function translateOptions(options){
for (let key in options) {
const v = options[key];
if (typeof(v) === 'string') {
options[key] = v.replace(/\$\{(\w+)\}/, function (v, n){
return options[n] || process.env[n] || v;
})
}
}
}
exports.run = function () {
const argv = require('cli-arguments').parse(require('../cli.json'));
translateOptions(argv.options);
loadSession()
.then(()=>commands[argv.command](argv))
.catch(err=>{