npmci/ts/npmci.config.ts

21 lines
555 B
TypeScript
Raw Normal View History

2016-11-24 22:21:40 +00:00
import * as q from 'q'
import * as plugins from './npmci.plugins'
import * as paths from './npmci.paths'
export interface INpmciOptions {
globalNpmTools: string[]
}
export let getConfig = () => {
console.log('getting config')
let done = q.defer<INpmciOptions>()
let npmciNpmextra = new plugins.npmextra.Npmextra(paths.cwd)
let defaultConfig: INpmciOptions = {
globalNpmTools: []
}
let npmciConfig = npmciNpmextra.dataFor<INpmciOptions>('npmci', defaultConfig)
done.resolve(npmciConfig)
return done.promise
}