support locating multiple configuration files
See original GitHub issueconfiguration like this:
new Liftoff({
configFiles: {
'.app': {
extensions: ['rc','.yml'],
search: {
cwd: {
path: './',
findUp: true
},
myHomeKey: '~',
etc: '/etc'
}
},
'appfile': {
extensions: function () {
return Object.keys(require.extensions)
},
searchPaths: {
baseDir: {
path: './',
findUp: true
},
home: '~',
alternate: '/path/to/alternate',
multiple: ['/path/to/whatever', '/path/to/something', '/path/to/something/else']
}
}
}
});
yields environment like this:
env.configFiles = {
'.app': {
cwd: '/var/www/project/code/.apprc',
myHomeKey: '/Users/user/.apprc',
etc: null
},
'appfile': {
baseDir: '/var/www/project/code/appfile.js',
home: null,
alternate: null,
multiple: ['/path/to/whatever/appfile.js', '/path/to/something/appfile.js']
}
};
~
expands to process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE
searchPath
entries which specify an array of paths should NOT perform findUp on each entry.
Issue Analytics
- State:
- Created 9 years ago
- Comments:22 (10 by maintainers)
Top Results From Across the Web
Multiple configuration files
Transitions from one software release to another can be performed while maintaining a separate configuration for the different software release versions.
Read more >Support Multiple Config Files/An import statement · Issue #2701
You have an import statement somewhere in the config file and it references a path to find other config. Support a list of...
Read more >Spring Boot and multiple external configuration files
To add different files you can use the spring.config.location properties which takes a comma separated list of property files or file location (directories) ......
Read more >Solved: Locating SAS Configuration Files - SAS Communities
There can be multiple config files chained from one to another - this is typical when working in the SAS Platform (Metadata Server, ......
Read more >Can you define a server's locations in multiple nginx config files?
And inside separate config you can use any valid code blocks: upstream app1 { server 127.0.0.1:8080; } location /app1 { proxy_pass ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Support for this was just published as 2.3.0
@phated Thank you for answering my questions.
If every result is a singular string, I also think that dropping the array syntax is better because it makes less confusing for users and I can’t think the cases in which the syntax is used.
Liftoff preferentially uses an earlier extension in specified order. (Though it isn’t guaranteed.)
I got it. I’ll do so.
I got it. I’ll implement not to expanded ‘~’ and ‘.’ but to use the key just as user specify.