Use this module for recursive auto parsing of configuration files as discussed at issue #7.
It also contains getCommon method for retreiving instances of preconfigured commonly used libraries (bbrest and jxon).
- returns all configuration values
- cliConfig - optional cli configuration object
config.get(cliConfig)
.then(function(config) {
// config is object of different configs: bb, bbrc, global, bower, bowerrc and optionally cli
});- returns global configuration file
config.getGlobal
.then(function(globalConfig) {
// globalConfig is value of the ~/.backbase/bb-cli.json
});- returns bb.json file as object
config.getBb()
.then(function(config) {
// config is value of the ./bb.json file
});- returns local component configuration by traversing and merging values found in parent dirs
config.getBbRc()
.then(function(localConfig) {
// localConfig is value of merged .bbrc files
});- returns combined configuration returned by .get but also preconfigured instances of bbrest and jxon
- cliConfig - optional cli configuration object
config.getCommon()
.then(function(obj) {
// obj contains config, bbrest and jxon keys
});- returns abolute path given the relative path or home dir path staring with ~
config.absolutizePath()
.then(function(aPath) {
// aPath is absolute path
});{
"name": "John Smith",
"email": "jsmith@example.com"
}{
"scheme": "http",
"host": "localhost",
"port": "8080",
"context": "portalserver",
"username": "john",
"password": "HU&69wev*!$8",
"portal": "myportal",
"path": "/path/to/the/portalserver",
"profiles": {
"dev": {
"host": "my-host.backbase.dev",
"port": "80",
"username": "username",
"password": "password"
}
}
}{
"name": "myWidget",
"version": "0.1.0",
"description": "If provided by bb scaff tool",
"authors": [{
"name": "Name Set By bb config",
"email": "email.set@by.config.bb"
}],
"repository": {
"type": "git",
"url": "git://path.to.users.stash.repository/provided.by.bb.config.git"
},
"license": "Backbase Standard",
"properties": {
"myPref": {
"default": "5"
}
}
}bower.json - link
{
"name": "my-project",
"version": "1.0.0",
"main": "path/to/main.css",
"ignore": [
".jshintrc",
"**/*.txt"
],
"dependencies": {
"<name>": "<version>",
"<name>": "<folder>",
"<name>": "<package>"
},
"devDependencies": {
"<test-framework-name>": "<version>"
}
}.bowerrc - link
{
"directory": "app/components/",
"analytics": false,
"timeout": 120000,
"registry": {
"search": [
"http://localhost:8000",
"https://bower.herokuapp.com"
]
}
}