fix(config): rename project config file from smartconfig.json to .smartconfig.json

This commit is contained in:
2026-03-24 15:54:25 +00:00
parent 488e78659c
commit 4a2d625d79
7 changed files with 8 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
{ {
"json.schemas": [ "json.schemas": [
{ {
"fileMatch": ["/smartconfig.json"], "fileMatch": ["/.smartconfig.json"],
"schema": { "schema": {
"type": "object", "type": "object",
"properties": { "properties": {

View File

@@ -46,7 +46,7 @@
"dist_ts_web/**/*", "dist_ts_web/**/*",
"assets/**/*", "assets/**/*",
"cli.js", "cli.js",
"smartconfig.json", ".smartconfig.json",
"readme.md" "readme.md"
], ],
"browserslist": [ "browserslist": [

View File

@@ -18,7 +18,7 @@ pnpm add @push.rocks/smartconfig
### Why 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 - **💾 Persistent Storage**: Smart key-value store with multiple storage strategies
- **🔐 Environment Mapping**: Sophisticated env var handling with automatic type conversion - **🔐 Environment Mapping**: Sophisticated env var handling with automatic type conversion
- **🏗️ TypeScript First**: Full type safety and IntelliSense support - **🏗️ TypeScript First**: Full type safety and IntelliSense support
@@ -29,7 +29,7 @@ pnpm add @push.rocks/smartconfig
### 1. Smartconfig Configuration Management ### 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 ```typescript
import { Smartconfig } from '@push.rocks/smartconfig'; import { Smartconfig } from '@push.rocks/smartconfig';
@@ -42,13 +42,13 @@ const smartconfig = new Smartconfig('/path/to/project');
// Get merged configuration for any tool // Get merged configuration for any tool
const eslintConfig = smartconfig.dataFor<EslintConfig>('eslint', { const eslintConfig = smartconfig.dataFor<EslintConfig>('eslint', {
// Default values if not in smartconfig.json // Default values if not in .smartconfig.json
extends: 'standard', extends: 'standard',
rules: {} rules: {}
}); });
``` ```
**smartconfig.json example:** **.smartconfig.json example:**
```json ```json
{ {
"eslint": { "eslint": {

View File

@@ -58,7 +58,7 @@ export class Smartconfig {
*/ */
private checkLookupPath() { private checkLookupPath() {
if (this.cwd) { if (this.cwd) {
this.lookupPath = plugins.path.join(this.cwd, 'smartconfig.json'); this.lookupPath = plugins.path.join(this.cwd, '.smartconfig.json');
} else { } else {
this.lookupPath = paths.configFile; this.lookupPath = paths.configFile;
} }

View File

@@ -19,4 +19,4 @@ export let home = plugins.smartpath.get.home();
export let kvUserHomeDirBase = plugins.path.join(home, '.smartconfig/kv'); export let kvUserHomeDirBase = plugins.path.join(home, '.smartconfig/kv');
// files // files
export let configFile = plugins.path.join(cwd, 'smartconfig.json'); export let configFile = plugins.path.join(cwd, '.smartconfig.json');