{"id":15311812,"url":"https://github.com/aslemammad/deconf","last_synced_at":"2025-07-18T16:37:28.321Z","repository":{"id":222713406,"uuid":"758172655","full_name":"Aslemammad/deconf","owner":"Aslemammad","description":"One config to rule them all. ","archived":false,"fork":false,"pushed_at":"2024-03-20T04:41:51.000Z","size":46,"stargazers_count":32,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-09T20:42:40.565Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Aslemammad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-15T19:07:40.000Z","updated_at":"2024-11-07T14:05:16.000Z","dependencies_parsed_at":"2024-02-15T20:29:06.125Z","dependency_job_id":"591960de-fa50-4da1-bf8e-9efa3b595fb0","html_url":"https://github.com/Aslemammad/deconf","commit_stats":{"total_commits":17,"total_committers":1,"mean_commits":17.0,"dds":0.0,"last_synced_commit":"45e2c021e67dbcfe27d87850a50e23046acba763"},"previous_names":["aslemammad/deconf"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Aslemammad/deconf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aslemammad%2Fdeconf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aslemammad%2Fdeconf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aslemammad%2Fdeconf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aslemammad%2Fdeconf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aslemammad","download_url":"https://codeload.github.com/Aslemammad/deconf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aslemammad%2Fdeconf/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265793684,"owners_count":23829180,"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-01T08:34:38.042Z","updated_at":"2025-07-18T16:37:28.283Z","avatar_url":"https://github.com/Aslemammad.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n[![tweet-1757420590103732371](https://github.com/Aslemammad/deconf/assets/37929992/8bb77b1d-4ac6-4f06-a75c-b3008b500aab)](https://twitter.com/_pi0_/status/1757420590103732371)\n# Deconf (RFC)\nThis is a trial for unifying the tooling configuration in the javascript ecosystem without breaking the current ecosystem or requiring a heavy change from the library authors. \n\nThere are also other attempts in this direction, check [config-dir](https://github.com/pi0/config-dir).\n\n## Syntax \nThe overall goal is to have all of our configurations in one file. As discussed in Twitter, JSON and Markdown can work.\n\nMarkdown looks ideal since it would support code blocks (e.g. js) and the only work that needs to be done is parsing the markdown and then linking those language markdown blocks to the tools we use daily. \n\n`config.md`:\n\n``````md\n# configuration\n\n## `vite.config.ts`\n\n```ts\nimport { defineConfig } from 'vite'\n\nexport default defineConfig({\n  esbuild: {\n    jsxFactory: 'h',\n    jsxFragment: 'Fragment',\n  },\n})\n```\n\nIgnore the triple backslashes (\\) as they are being used here to avoid github's markdown bug. In the real-world use case, triple backticks (`) are enough.\n\n## `.eslintrc.json`\n\n```json\n{\n    \"rules\": {\n        \"eqeqeq\": \"warn\",\n        \"strict\": \"off\"\n    }\n}\n```\n\n## `tsconfig.json`\n\n```json\n{\n  \"compilerOptions\": {\n    \"module\": \"system\",\n    \"noImplicitAny\": true,\n    \"removeComments\": true,\n    \"preserveConstEnums\": true,\n    \"outFile\": \"../../built/local/tsc.js\",\n    \"sourceMap\": true\n  },\n  \"include\": [\"src/**/*\"],\n  \"exclude\": [\"**/*.spec.ts\"]\n}\n``` \n``````\n\n\n\nThe frontmatter section (optional) maps each second level heading to the corresponding file path on the disk. In this example, it maps the vite configuration to the `vite.config.ts`. \n\nSecond level headings also accept files directly without the need for frontmatter by just wrapping their value with __\\`\\`__ similar to the __\\`tsconfig.json\\`__ configuration.\n\nOther levels of headings and markdown features are basically ignored so the user can use them for documenting or commenting on configurations.\n\nThe languages in code blocks (**ts** in __\\`\\`\\`ts__) are also ignored by the parser but they can be helpful for the user's editor to enable syntax highlighting or formatting.\n\n## Implementation\n### Symlinks\nDeconf has to parse the markdown and for each configuration, it creates a corresponding file in `node_modules/.deconf` and then a symlink in the project's root directory. \n\nThe reason it should be included in the directory is that the purpose of Deconf is to not break the ecosystem conventions.\n```\n/vite.config.ts =\u003e /node_modules/.deconf/vite.config.ts\n```\n\n### Workspace\n\nThe symbolic link files should ideally be ignored by Git and the editor, possibly through an automatic command in Deconf.\n### Changes\n\nDeconf needs to monitor changes in the `config.md` file and replicate the necessary changes on the user's disk.\n\nAs there is no npm hook for running before any npm command, a potential solution might involve initiating a process during the system's startup to monitor the `config.md` files that were initialized by a command such as `deconf init`.\n\nFor other users that haven't initialized the `config.md` (with `deconf init`) themselves might need a `postinstall` script in the project so the startup process identifies the `config.md` files in the project.\n## Lsp\n\nThe concern is the language server support for the code blocks in Markdown, enabling users to access features like autocompletion for JavaScript or TypeScript code blocks in the `config.md` file.\nSo more information is needed for this section. \n\n\n## TODO \n- [x] parse config md\n- [x] emit files in .deconf\n- [x] symlinking\n- [x] git ignore modify command\n- [x] vscode ignore (https://stackoverflow.com/a/36193178)\n- [ ] daemon\n  - [ ] add files to watchlist in daemon\n  - [ ] run daemon in the start of system (.zshrc?)\n\n  \n## Contributing \n\nFeel free to raise an issue about the design or add any implementation detail to any of the sections above. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faslemammad%2Fdeconf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faslemammad%2Fdeconf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faslemammad%2Fdeconf/lists"}