Helper

core:bootConfig

helper('core:bootConfig')(basename)

core:bootDeep

helper('core:bootDeep')(opts)

core:bootFlat

helper('core:bootFlat')(basename)

core:bootInfo

helper('core:bootInfo')(text)

core:configFileExt

helper('core:configFileExt')()

core:configLoad

helper('core:configLoad')(dir, name)

name could be the basename of the configuration file, or a directory name which hold the actual configuration file.

If it a file, it will be searched according this simple rule: .js first, and if not found then .json. If .json also not found, then it simply returns an empty object.

If name is a directory, then it will try to load index.js or index.json accordingly.

On both cases, the .js file needs to return a Promise and have to be wrapped inside a cuk wrapper like this:

config.js
module.exports = function(cuk) {
  return new Promise((resolve, reject) => {
    ... 
    resolve({ my: 'config' })
  }
}

core:makeChoices

helper('core:bootChoices')(text)

core:makeOptions

helper('core:bootConfig')(basename)

core:makeId

helper('core:makeId')(basename)

core:makeRelDir

helper('core:bootConfig')(basename)

core:merge

helper('core:bootConfig')(basename)

core:objectPickBy

helper('core:bootConfig')(basename)

core:pkgs

helper('core:pkgs')(filter)

core:pkg

helper('core:pkg')(basename)

core:parseUnitOfTime

helper('core:bootConfig')(basename)

core:collSortBy

helper('core:bootConfig')(basename)

core:makeError

helper('core:bootConfig')(basename)

Last updated