diff --git a/.gitignore b/.gitignore index e9488ef..a494344 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .out node_modules +src/internal/Schema.pkl diff --git a/.mise.toml b/.mise.toml index 06058dc..562c39d 100644 --- a/.mise.toml +++ b/.mise.toml @@ -8,7 +8,7 @@ pnpm = "latest" [tasks.pull-schema] run = """ -pkl eval package://pkg.pkl-lang.org/pkl-pantry/org.json_schema.contrib@1.0.3#/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/org.json_schema.contrib@1.0.3#/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 """ diff --git a/src/BiomeDefault.pkl b/src/BiomeDefault.pkl new file mode 100644 index 0000000..4f9645e --- /dev/null +++ b/src/BiomeDefault.pkl @@ -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 . `, to output a `biome.json` file." + files { + ["./biome.json"] { + value = module + renderer = new JsonRenderer {} + } + } +} diff --git a/src/BiomeGit.pkl b/src/BiomeGit.pkl new file mode 100644 index 0000000..6c1347c --- /dev/null +++ b/src/BiomeGit.pkl @@ -0,0 +1,9 @@ +module biome.Git + +amends "./Biome.pkl" + +vcs { + enabled = true + clientKind = "git" + useIgnoreFile = true +}