yini-cli 1.0.2-beta → 1.0.3-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +70 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -28,7 +28,75 @@
|
|
|
28
28
|
|
|
29
29
|
---
|
|
30
30
|
|
|
31
|
-
##
|
|
31
|
+
## Quick Into to YINI Format
|
|
32
|
+
|
|
33
|
+
YINI code looks like this:
|
|
34
|
+
```yini
|
|
35
|
+
// This is a comment in YINI
|
|
36
|
+
// YINI is a simple, human-readable configuration file format.
|
|
37
|
+
|
|
38
|
+
// Note: In YINI, spaces and tabs don't change meaning - indentation is just
|
|
39
|
+
// for readability.
|
|
40
|
+
|
|
41
|
+
/* This is a block comment
|
|
42
|
+
|
|
43
|
+
In YINI, section headers use repeated characters "^" at the start to
|
|
44
|
+
show their level: (Section header names are case-sensitive.)
|
|
45
|
+
|
|
46
|
+
^ SectionLevel1
|
|
47
|
+
^^ SectionLevel2
|
|
48
|
+
^^^ SectionLevel3
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
^ App // Definition of section (group) "App"
|
|
52
|
+
name = 'My Title' // Keys and values are written as key = value
|
|
53
|
+
items = 25
|
|
54
|
+
darkMode = true // "ON" and "YES" works too
|
|
55
|
+
|
|
56
|
+
// Sub-section of the "App" section
|
|
57
|
+
^^ Special
|
|
58
|
+
primaryColor = #336699 // Hex number format
|
|
59
|
+
isCaching = false // "OFF" and "NO" works too
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**The above YINI converted to a JS object:**
|
|
63
|
+
```js
|
|
64
|
+
{
|
|
65
|
+
App: {
|
|
66
|
+
name: 'My Title',
|
|
67
|
+
items: 25,
|
|
68
|
+
darkMode: true,
|
|
69
|
+
Special: {
|
|
70
|
+
primaryColor: 3368601,
|
|
71
|
+
isCaching: false
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**In JSON:**
|
|
78
|
+
```json
|
|
79
|
+
{
|
|
80
|
+
"App":{
|
|
81
|
+
"name":"My Title",
|
|
82
|
+
"items":25,
|
|
83
|
+
"darkMode":true,
|
|
84
|
+
"Special":{
|
|
85
|
+
"primaryColor":3368601,
|
|
86
|
+
"isCaching":false
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
That's it!
|
|
93
|
+
|
|
94
|
+
- ▶️ Link to [examples/](https://github.com/YINI-lang/yini-parser-typescript/tree/main/examples) files.
|
|
95
|
+
- ▶️ Link to [Demo Apps](https://github.com/YINI-lang/yini-demo-apps/tree/main) with complete basic usage.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Bigger Intro into YINI Config Format
|
|
32
100
|
**YINI** is a simple and readable configuration format. Sections are defined with `^ SectionName`, and values are assigned using `key = value`. The format supports common data types (same as those found in JSON), including strings, numbers, booleans, nulls, and lists.
|
|
33
101
|
|
|
34
102
|
To learn more, see the [Getting Started: Intro to YINI Config Format](https://github.com/YINI-lang/YINI-spec/blob/develop/Docs/Intro-to-YINI-Config-Format.md) tutorial.
|
|
@@ -39,7 +107,7 @@ To learn more, see the [Getting Started: Intro to YINI Config Format](https://gi
|
|
|
39
107
|
|
|
40
108
|
### Installation
|
|
41
109
|
|
|
42
|
-
1. **Install it globally from npm**
|
|
110
|
+
1. **Install it globally from npm — (requires Node.js)**
|
|
43
111
|
Open your terminal and run:
|
|
44
112
|
```
|
|
45
113
|
npm install -g yini-cli
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yini-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3-beta",
|
|
4
4
|
"description": "CLI for parsing and validating YINI config files: type-safe values, nested sections, comments, minimal syntax noise, and optional strict mode.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"yini",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"author": "Marko K. Seppänen",
|
|
69
69
|
"dependencies": {
|
|
70
70
|
"commander": "^14.0.0",
|
|
71
|
-
"yini-parser": "^1.0
|
|
71
|
+
"yini-parser": "^1.1.0-beta"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@eslint/js": "^9.31.0",
|