{"id":13565719,"url":"https://github.com/vincentmorneau/node-package-configurator","last_synced_at":"2025-04-15T15:04:29.153Z","repository":{"id":57285007,"uuid":"82340954","full_name":"vincentmorneau/node-package-configurator","owner":"vincentmorneau","description":"Allows you to store local configuration files for your Node.js packages","archived":false,"fork":false,"pushed_at":"2018-12-24T14:34:25.000Z","size":853,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T21:34:41.441Z","etag":null,"topics":["config","javascript","json","json-schema","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vincentmorneau.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","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":"2017-02-17T21:47:57.000Z","updated_at":"2022-04-24T06:59:37.000Z","dependencies_parsed_at":"2022-08-24T18:10:38.825Z","dependency_job_id":null,"html_url":"https://github.com/vincentmorneau/node-package-configurator","commit_stats":null,"previous_names":["vincentmorneau/json-local-configurator"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vincentmorneau%2Fnode-package-configurator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vincentmorneau%2Fnode-package-configurator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vincentmorneau%2Fnode-package-configurator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vincentmorneau%2Fnode-package-configurator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vincentmorneau","download_url":"https://codeload.github.com/vincentmorneau/node-package-configurator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248610325,"owners_count":21132924,"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":["config","javascript","json","json-schema","nodejs"],"created_at":"2024-08-01T13:01:53.905Z","updated_at":"2025-04-15T15:04:29.111Z","avatar_url":"https://github.com/vincentmorneau.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Node Package Configurator\n\n[![npm](https://img.shields.io/npm/v/node-package-configurator.svg)](https://www.npmjs.com/package/node-package-configurator) [![Build Status](https://travis-ci.org/vincentmorneau/node-package-configurator.svg?branch=master)](https://travis-ci.org/vincentmorneau/node-package-configurator) [![Dependency Status](https://david-dm.org/vincentmorneau/node-package-configurator.svg)](https://david-dm.org/vincentmorneau/node-package-configurator) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)\n\n![demo](/docs/demo.png)\n\nNode Package Configurator (npc) generates a dynamic web form out of a JSON schema. The user fills the forms, npc resolves the JSON schema into a JSON object, and saves the result locally for persistent storage.\n\nOn Windows, npc saves the config file in the user App Data. Example: `C:\\users\\vmorneau\\App Data\\yourModuleName`  \nOn MacOS, npc saves the file in the library preference folder. Example: `~/Library/Preferences/yourModuleName`  \nOn Linux, npc saves the file in the root folder. Example: `~/yourModuleName`  \n\nYou can retrieve this file (your project configuration) at any time.\n\n## Install\n\n```\nnpm install node-package-configurator\n```\n\n## Usage\n\n### Launch the form\n\n```javascript\nconst npc = require('node-package-configurator');\nconst schema = require('path_to_your_json_schema');\n\nnpc.init({\n    modules: [\"my-module\"],\n    logo: \"url\",\n    project: \"my-project\",\n    jsonSchema: schema\n});\n```\n\n### Getting the config\n\n```javascript\nconst npc = require('node-package-configurator');\n\nnpc.getConfig({\n    modules: [\"my-module\"],\n    project: \"my-project\"\n});\n```\n\n## Options\n\nName | Type | Default | Description\n--- | --- | --- | ---\nmodule | array | | List of module names, in order of priority.\nlogo | string | | URL to your project logo (optional)\nproject | string | | Name of the project\njsonSchema | object | | JSON Schema to use in the form\n\n## Methods\n\nName | Type | Returns | Description\n--- | --- | --- | ---\ninit | function | | Initializes the HTML form\ngetConfig | function | object | Returns the configuration object of the given project\ngetProjects | function | array | Returns an array of available project names\ngetFile | function | object | Returns a file for your npm module from the file system (AppData for Windows, root otherwise)\nsetFile | function | object | Writes a file for your npm module in the file system (AppData for Windows, root otherwise)\n\n## Changelog\n\n[See changelog.](changelog.md)\n\n## Special thanks to\n\n[Brutusin json-forms](https://github.com/brutusin/json-forms)\n\n## License\n\nMIT © [Vincent Morneau](http://vmorneau.me)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvincentmorneau%2Fnode-package-configurator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvincentmorneau%2Fnode-package-configurator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvincentmorneau%2Fnode-package-configurator/lists"}