Skip to content

Commit aed2074

Browse files
authored
build: publish schema.json enabling local reference (#689)
1 parent 72827c0 commit aed2074

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

.changeset/free-windows-wish.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@effect/language-service": minor
3+
---
4+
5+
Adds ability to reference `$schema` from local installation

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ This package implements a TypeScript language service plugin that allows additio
1010
2. Inside your tsconfig.json, you should add the plugin configuration as follows:
1111
```jsonc
1212
{
13-
"$schema": "https://raw.githubusercontent.com/Effect-TS/language-service/refs/heads/main/schema.json",
13+
"$schema": "./node_modules/@effect/language-service/schema.json",
14+
// or from Github (may drift from your local installation)
15+
// "$schema": ""https://raw.githubusercontent.com/Effect-TS/language-service/refs/heads/main/schema.json",
1416
"compilerOptions": {
1517
"plugins": [
1618
// ... other LSPs (if any) and as last

packages/language-service/tsup.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ export default defineConfig({
2525
const license = yield* (fs.readFileString("../../LICENSE"))
2626
yield* (fs.writeFileString(path.join("dist", "LICENSE"), license))
2727

28+
// copy over schema.json (from repo root)
29+
const schema = yield* (fs.readFileString("../../schema.json"))
30+
// distribute schema.json to be able to reference it locally
31+
yield* (fs.writeFileString(path.join("dist", "schema.json"), schema))
32+
2833
// generate package.json
2934
const json = yield* (fs.readFileString("package.json").pipe(Effect.map(JSON.parse)))
3035
const pkg = {

0 commit comments

Comments
 (0)