quave:settings

v0.0.1Published 4 years ago

This package has not had recent updates. Please investigate it's current state before committing to using it in your project.

quave:settings

quave:settings is a Meteor package that allows you to get settings for a specific package in a standard way.

Why

Many packages need to read settings in the startup phase, with this package we can all use the same standard. This package is intended for package authors.

We believe we are not reinventing the wheel in this package but what we are doing is like putting together the wheels in the vehicle :).

Installation

Package usage (package.js)

1  api.use('quave:settings@1.0.0');

Application usage

meteor add quave:settings

Usage

1import { getSettings } from "meteor/quave:settings";
2
3const PACKAGE_NAME = "quave:collections";
4
5const settings = getSettings({ packageName: PACKAGE_NAME });
6
7const { isVerbose } = settings;
8
9if (isVerbose) {
10  console.log(`[${PACKAGE_NAME}]: starting...`);
11}

Limitations

  • We expect your settings to be in your Meteor settings file, inside the packages key and then inside a key with your package name. You can add settings to the public section as well, following the same standard. Public settings take precedence over private.

License

MIT