Skip to content

Commit

Permalink
feat: added BiomeDefault and BiomeGit separate files
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvander committed Mar 9, 2024
1 parent 8a484c7 commit ebdc323
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.out
node_modules
src/internal/Schema.pkl
6 changes: 3 additions & 3 deletions .mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pnpm = "latest"

[tasks.pull-schema]
run = """
pkl eval package://pkg.pkl-lang.org/pkl-pantry/[email protected]#/generate.pkl -m src -p source=\"https://biomejs.dev/schemas/$(cat version.txt)/schema.json\"
cat src/Schema.pkl | sed 's/(\\([A-Za-z0-9]*\\)|Any)/\\1/g' | sed 's/module Schema/module Biome/g' > src/Biome.pkl
rm src/Schema.pkl
pkl eval package://pkg.pkl-lang.org/pkl-pantry/[email protected]#/generate.pkl -m src/internal -p source=\"https://biomejs.dev/schemas/$(cat version.txt)/schema.json\"
cat src/internal/Schema.pkl | sed 's/(\\([A-Za-z0-9]*\\)|Any)/\\1/g' > src/internal/_Schema.pkl
mv src/internal/_Schema.pkl src/internal/Schema.pkl
"""
28 changes: 28 additions & 0 deletions src/BiomeDefault.pkl
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
module biome.Default

amends "./internal/Schema.pkl"

organizeImports {
enabled = true
}

formatter {
enabled = true
}

linter {
enabled = true
rules {
recommended = true
}
}

output {
text = "Use multiple file mode, e.g. `pkl eval -m . <file>`, to output a `biome.json` file."
files {
["./biome.json"] {
value = module
renderer = new JsonRenderer {}
}
}
}
9 changes: 9 additions & 0 deletions src/BiomeGit.pkl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module biome.Git

amends "./Biome.pkl"

vcs {
enabled = true
clientKind = "git"
useIgnoreFile = true
}

0 comments on commit ebdc323

Please sign in to comment.