fix: Fixing the map.json file location

fixes: #491
This commit is contained in:
Justin 2019-11-13 21:03:41 +01:00
parent f6dcbd796a
commit ced94153d2
2 changed files with 4 additions and 3 deletions

View File

@ -7,7 +7,7 @@
"email": "justin.s.dalrymple@gmail.com"
},
"bin": {
"gitlab": "./dist/cli.js"
"gitlab": "./dist/index.cli.js"
},
"browser": "dist/index.browser.js",
"bugs": {

View File

@ -19,7 +19,7 @@ program
// Add all supported API's
/* eslint global-require: 0 import/no-unresolved: 0 */
const map = require('../../dist/map.json') || {};
const map = require('./map.json') || {};
Object.entries(map).forEach(([name, methods]: [string, { name: string; args: string[] }[]]) => {
const baseArgs: string[] = methods[0].args;
@ -78,7 +78,8 @@ Object.entries(map).forEach(([name, methods]: [string, { name: string; args: str
const s = new core[name](initArgs);
// Execute function
return s[m.name](...Object.values(coreArgs), optionalArgs);
return s[m.name](...Object.values(coreArgs), optionalArgs)
.then(console.log);
},
);
}