# meteor-devel-settings

> Meteor settings.json override with devel and personal levels

Latest version **1.0.1** (published 2018-04-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install meteor-devel-settings
pnpm add meteor-devel-settings
yarn add meteor-devel-settings
bun add meteor-devel-settings
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2018-04-09 |
| First published | 2018-04-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 7.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Glaznah Gassner |
| Maintainers | adversinc |
| Keywords | meteor, settings, development |

## Links

- npm: https://www.npmjs.com/package/meteor-devel-settings
- Repository: https://github.com/adversinc/devel-settings
- Homepage: https://github.com/adversinc/devel-settings#readme
- Issues: https://github.com/adversinc/devel-settings/issues
- npm.io page: https://npm.io/package/meteor-devel-settings

## Dependencies (2)

- [deep-assign](https://npm.io/package/deep-assign.md) ^2.0.0
- [strip-json-comments](https://npm.io/package/strip-json-comments.md) ^2.0.1

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2018-04-09
- 1.0.0 — 2018-04-09

## README

The module allows having several settings.json layers for production,
development and personal (local) usage.

Module activates itself in development env only (process.env.NODE_ENV === "development"),
and does not do anything in production.

**Module affects only the "private" branch (server-side) of the settings!**

# Goal

The goal is to have a main settings.json file with all settings required for
the project (both in development and production env).

However, the development env usually requires some adjustments to the settings
(like using devel REST endpoits, ports etc). Moreover, the local developer's
machine is often configured to use another (third) settings set.

This module does the job by overlapping the default ("production") settings
with development settings, and then with personal settings.

# Usage

```
import develSettings from "meteor-devel-settings";
develSettings(Meteor, Assets);
```

1. Meteor is being started as usual: "meteor --settings /private/settings.json"
2. Import meteor-devel-settings
2. develSettings(), upon called, tries to open /private/settings-devel.json and
then /private/settings-personal.json
3. If these files found in /private, their contents is appended to the default
settings, overwriting them.

## Comments

Both settings-devel.json and settings-personal.json support relaxed JSON and
and comments:

* keys can be bare words (no quotes),
* the comma after the last list entry can be used,
* both /* ... */ and // comments are supported.

Remember that main settings.json has to be a strict JSON.

## Git recommendations

It is advised to add /personal/settings-personal.json to .gitignore since
this file varies for each developer.

# Example

The example of the /private/settings-devel.json file:

```
{
	/*
	This is a development settings file for a developer. These settings are being
	applied over the /config/settings.json.

	Currently can NOT modify the "public" branch of the settings.
	*/

	private: {
		API: {
			endpoint: "https://www.github.com/api/",
			port: 3002,
		},
	}
}
```

The example of the /private/settings-personal.json file:

```
{
	/*
	This is a personal settings file for a developer. These settings are being
	applied over the /config/settings.json, and then over /private/settings-devel.json
	after startup.

	Currently can NOT modify the "public" branch of the settings.

	Should not be added to VCS.
	*/

	private: {
		API: {
			endpoint: "http://127.0.0.1",
		},
	}
}
```

---
_Source: https://npm.io/package/meteor-devel-settings · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
