update async functions
This commit is contained in:
@@ -4,16 +4,14 @@ import * as plugins from './npmci.plugins'
|
||||
import * as paths from './npmci.paths'
|
||||
|
||||
export interface INpmciOptions {
|
||||
globalNpmTools: string[]
|
||||
globalNpmTools: string[]
|
||||
}
|
||||
|
||||
export let getConfig = () => {
|
||||
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
|
||||
export let getConfig = async (): Promise<INpmciOptions> => {
|
||||
let npmciNpmextra = new plugins.npmextra.Npmextra(paths.cwd)
|
||||
let defaultConfig: INpmciOptions = {
|
||||
globalNpmTools: []
|
||||
}
|
||||
let npmciConfig = npmciNpmextra.dataFor<INpmciOptions>('npmci', defaultConfig)
|
||||
return npmciConfig
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user