UNPKG

newkit-cli

Version:

Newkit cli tools.

24 lines (20 loc) 518 B
const negConfig = require('neg-config'); const util = require('./../lib/util'); let configObj = null; const getConfig = key => { return new Promise((resolve, reject) => { if (configObj) { return resolve(configObj); } negConfig.init({ env: 'gdev' }) .then(() => { negConfig.retriveConfig('bts', 'newkit-cli-config', data => { configObj = data; resolve(configObj); }); }).catch(err => console.error(err)); }); }; module.exports = { getConfig };