From 4a2d625d7949627fdc9e1018fe7e41a2815288b5 Mon Sep 17 00:00:00 2001 From: Juergen Kunz Date: Tue, 24 Mar 2026 15:54:25 +0000 Subject: [PATCH] fix(config): rename project config file from smartconfig.json to .smartconfig.json --- smartconfig.json => .smartconfig.json | 0 .vscode/settings.json | 2 +- package.json | 2 +- readme.md | 8 ++++---- test/{smartconfig.json => .smartconfig.json} | 0 ts/classes.smartconfig.ts | 2 +- ts/paths.ts | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) rename smartconfig.json => .smartconfig.json (100%) rename test/{smartconfig.json => .smartconfig.json} (100%) diff --git a/smartconfig.json b/.smartconfig.json similarity index 100% rename from smartconfig.json rename to .smartconfig.json diff --git a/.vscode/settings.json b/.vscode/settings.json index 21500c8..7b514e3 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,7 @@ { "json.schemas": [ { - "fileMatch": ["/smartconfig.json"], + "fileMatch": ["/.smartconfig.json"], "schema": { "type": "object", "properties": { diff --git a/package.json b/package.json index 9fd527a..91cb9a0 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "dist_ts_web/**/*", "assets/**/*", "cli.js", - "smartconfig.json", + ".smartconfig.json", "readme.md" ], "browserslist": [ diff --git a/readme.md b/readme.md index dc9855f..708528a 100644 --- a/readme.md +++ b/readme.md @@ -18,7 +18,7 @@ pnpm add @push.rocks/smartconfig ### Why smartconfig? -- **🎛️ Centralized Configuration**: Manage all your tool configs in one `smartconfig.json` file +- **🎛️ Centralized Configuration**: Manage all your tool configs in one `.smartconfig.json` file - **💾 Persistent Storage**: Smart key-value store with multiple storage strategies - **🔐 Environment Mapping**: Sophisticated env var handling with automatic type conversion - **🏗️ TypeScript First**: Full type safety and IntelliSense support @@ -29,7 +29,7 @@ pnpm add @push.rocks/smartconfig ### 1. Smartconfig Configuration Management -Stop scattering configuration across dozens of files. Centralize everything in `smartconfig.json`: +Stop scattering configuration across dozens of files. Centralize everything in `.smartconfig.json`: ```typescript import { Smartconfig } from '@push.rocks/smartconfig'; @@ -42,13 +42,13 @@ const smartconfig = new Smartconfig('/path/to/project'); // Get merged configuration for any tool const eslintConfig = smartconfig.dataFor('eslint', { - // Default values if not in smartconfig.json + // Default values if not in .smartconfig.json extends: 'standard', rules: {} }); ``` -**smartconfig.json example:** +**.smartconfig.json example:** ```json { "eslint": { diff --git a/test/smartconfig.json b/test/.smartconfig.json similarity index 100% rename from test/smartconfig.json rename to test/.smartconfig.json diff --git a/ts/classes.smartconfig.ts b/ts/classes.smartconfig.ts index c117fda..89b8403 100644 --- a/ts/classes.smartconfig.ts +++ b/ts/classes.smartconfig.ts @@ -58,7 +58,7 @@ export class Smartconfig { */ private checkLookupPath() { if (this.cwd) { - this.lookupPath = plugins.path.join(this.cwd, 'smartconfig.json'); + this.lookupPath = plugins.path.join(this.cwd, '.smartconfig.json'); } else { this.lookupPath = paths.configFile; } diff --git a/ts/paths.ts b/ts/paths.ts index 129ccdb..cdec621 100644 --- a/ts/paths.ts +++ b/ts/paths.ts @@ -19,4 +19,4 @@ export let home = plugins.smartpath.get.home(); export let kvUserHomeDirBase = plugins.path.join(home, '.smartconfig/kv'); // files -export let configFile = plugins.path.join(cwd, 'smartconfig.json'); +export let configFile = plugins.path.join(cwd, '.smartconfig.json');