@qiwi/uniconfig-plugin-path
v3.6.1
Published
Uniconfig path resolver plugin
Downloads
71
Readme
@qiwi/uniconfig-plugin-path
Uniconfig path resolver plugin
Install
npm i @qiwi/uniconfig-plugin-path
yarn add @qiwi/uniconfig-plugin-path
Usage
import uniconfig, {rollupPlugin} from '@qiwi/uniconfig-core'
import uniconfigPluginPath from '@qiwi/uniconfig-plugin-path'
rollupPlugin(uniconfigPluginPath)
const config = uniconfig({data: ['<root>', 'config/default.json']}, {pipeline: 'path'})
config.get() // '/Users/antongolub/projects/uniconfig/config/default.json'
root
reference
As practice shows, it's quite useful to build paths from the app root. So the path
plugin works as preset, and adds root plugin along with it.
Root aliases: <root>
, $root
and APP_ROOT
.