Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/quavedev/settings
Meteor Utility package to get settings for a package
https://github.com/quavedev/settings
meteor meteor-package settings
Last synced: 24 days ago
JSON representation
Meteor Utility package to get settings for a package
- Host: GitHub
- URL: https://github.com/quavedev/settings
- Owner: quavedev
- Created: 2020-04-26T14:27:03.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-29T17:01:51.000Z (over 4 years ago)
- Last Synced: 2024-11-11T22:36:55.348Z (3 months ago)
- Topics: meteor, meteor-package, settings
- Language: JavaScript
- Size: 1.95 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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 :).
## InstallationPackage usage (package.js)
```javascript
api.use('quave:[email protected]');
```Application usage
```sh
meteor add quave:settings
```### Usage
```javascript
import { getSettings } from "meteor/quave:settings";const PACKAGE_NAME = "quave:collections";
const settings = getSettings({ packageName: PACKAGE_NAME });
const { isVerbose } = settings;
if (isVerbose) {
console.log(`[${PACKAGE_NAME}]: starting...`);
}
```## 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