{"id":16941337,"url":"https://github.com/joeybaker/jace","last_synced_at":"2025-12-31T00:03:33.083Z","repository":{"id":19323969,"uuid":"22562327","full_name":"joeybaker/jace","owner":"joeybaker","description":"JSON Ampersand Configuration by Environment State","archived":false,"fork":false,"pushed_at":"2014-09-07T01:34:48.000Z","size":188,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-01T16:04:52.242Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joeybaker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-03T00:34:27.000Z","updated_at":"2014-09-06T21:06:57.000Z","dependencies_parsed_at":"2022-09-26T22:11:04.150Z","dependency_job_id":null,"html_url":"https://github.com/joeybaker/jace","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeybaker%2Fjace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeybaker%2Fjace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeybaker%2Fjace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeybaker%2Fjace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joeybaker","download_url":"https://codeload.github.com/joeybaker/jace/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244752337,"owners_count":20504254,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T21:09:17.382Z","updated_at":"2025-12-31T00:03:33.043Z","avatar_url":"https://github.com/joeybaker.png","language":"JavaScript","readme":"# JACE\n\n[![NPM](https://nodei.co/npm/jace.png)](https://nodei.co/npm/jace/) [![Build Status](https://travis-ci.org/joeybaker/jace.png?branch=master)](https://travis-ci.org/joeybaker/jace)\n\nNode project configuration. Jace sounds like brace. Braces support things. Jace supports the whole project.\n\nJace is a configuration library for a node project that recognizes several levels of overrides. [ALCE](https://github.com/walmartlabs/ALCE) is used for JSON parsing so your JSON can have comments.\n\nThe order of preference, higher numbers override lower numbers.\n\n1. default.json\n2. {env}.json // env is determined by the `NODE_ENV` bash variable, or by the `env` option.\n3. bash env vars, converted to nested objects.\n4. options object\n\nEvery level merges and overrides the previous.\n\n## Install\n`npm i -S jace`\n\n## Usage\n```js\nvar jace = require('jace')\n  , options = {\n    db: {\n      user: 'me'\n    }\n    , users: 0\n    // defaults to './config'\n    , configPath: __dirname\n  }\n  , config = jace(options)\n\n// config is an ampersand-state object\nconfig.env // will be the value of process.env.NODE_ENV if set, else 'default'\nconfig.db.user // 'me'\n```\n\n### Setting env vars\nBash environmental variables are set with `export MY_VAR=rabbit`. Jace converts snake case (underscore separated) env vars into nested objects.\n\n`MY_RABBIT=fluffy` becomes `{my: {rabbit: 'fluffy'}}`\n\n`MY_RABBIT=fluffy; MY_BUNNY=cottontail` becomes `{my: {rabbit: 'fluffy', bunny: 'cottontail'}}`\n\n## Options\n### `\u003cString\u003e configPath`\nWhere should we look for `default.json` and other config files? Defaults to `./config`.\n\n### `\u003cBoolean\u003e allEnv`\nDefaults to `false`. If `true`, will pull in all env vars, not just the ones defined in a JSON config file or the options.\n\nNOTE: most systems have many irrelvant env vars. It's easy to pollute your config with uncessary properties if you turn this on.\n\n## Tests\nTests are [prova](https://github.com/azer/prova), based on [tape](https://github.com/substack/tape). They can be run with `npm test`.\n\n## Developing\nTo publish, run `gulp publish --bump=patch`\n\n## Changelog\n### 2.0.0\nNo longer uses ampersand-state for base config. It turned out too be too brittle and really, config should only be set once.\n\n### 1.0.0\nInitial Release\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeybaker%2Fjace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoeybaker%2Fjace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeybaker%2Fjace/lists"}