File tree Expand file tree Collapse file tree 1 file changed +36
-3
lines changed Expand file tree Collapse file tree 1 file changed +36
-3
lines changed Original file line number Diff line number Diff line change 1
1
<section class =" kdl-section " id =" description " >
2
2
3
- KDL is a document language with xml-like semantics that looks like you're
4
- invoking a bunch of CLI commands! It's meant to be used both as a
3
+ KDL is a small, pleasing document language with xml-like semantics that looks
4
+ like you're invoking a bunch of CLI commands! It's meant to be used both as a
5
5
serialization format and a configuration language, much like JSON, YAML, or
6
- XML.
6
+ XML. It looks like this:
7
+
8
+ ``` kdl
9
+ package {
10
+ name "my-pkg"
11
+ version "1.2.3"
12
+
13
+ dependencies {
14
+ // Nodes can have standalone values as well as key/value pairs.
15
+ lodash "^3.2.1" optional=true alias="underscore"
16
+ }
17
+
18
+ scripts {
19
+ // "Raw" and multi-line strings are supported.
20
+ build r#"
21
+ echo "foo"
22
+ node -c "console.log('hello, world!');"
23
+ echo "foo" > some-file.txt
24
+ "#
25
+ }
26
+
27
+ // `\` breaks up a single node across multiple lines.
28
+ the-matrix 1 2 3 \
29
+ 4 5 6 \
30
+ 7 8 9
31
+
32
+ // "Slashdash" comments operate at the node level, with just `/-`.
33
+ /-this-is-commented {
34
+ this "entire" "node" {
35
+ "is" "gone"
36
+ }
37
+ }
38
+ }
39
+ ```
7
40
8
41
There's a living [ specification] ( https://github.com/kdl-org/kdl/blob/main/SPEC.md ) , as well as various
9
42
[ implementations] ( #implementations ) . You can also check out the [ FAQ] ( #faq ) to
You can’t perform that action at this time.
0 commit comments