@comocapital/config

Our shared application config loader. The main difference from plain cosmiconfig is support for default options.

Usage no npm install needed!

<script type="module">
  import comocapitalConfig from 'https://cdn.skypack.dev/@comocapital/config';
</script>

README

@comocapital/config

Our shared application config loader. The main difference from plain cosmiconfig is support for default options.

The name of application config should be one of:

  • field comocapital in package.json
  • .comocapitalrc
  • .comocapitalrc.json
  • .comocapitalrc.yaml
  • .comocapitalrc.js
  • comocapital.config.js

Usage

const comoconfig = require('@comocapital/config');

const config = comoconfig.sync({ demo: false });

For async loading:

const comoconfig = require('@comocapital/config');

async function main() {
  const config = await comoconfig({ demo: false });
}

License

MIT, 2018 © Como Capital