mirror of
https://github.com/vector-im/element-call.git
synced 2026-09-10 21:55:19 +00:00
Make the component installable as a git dependency
`component/package.json` describes the built component as a package (`@element-hq/element-call-component`: entry, stylesheet subpath, types, peer dependencies) so that a host can depend on `github:element-hq/element-call#<ref>&path:/component`. Its `prepare` script builds on install, since nothing is published yet. For that the component build now lands in `component/dist` instead of the repository's `dist`, and `pnpm build:component` also emits the type declarations (`component/tsconfig.build.json`, `build:component:types`), which previously had to be produced by hand. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
committed by
Timo K.
co-authored by
Claude Fable 5.1
parent
38c28a1c8f
commit
218ee46b7d
@@ -0,0 +1,20 @@
|
||||
{
|
||||
// Declaration output for the component package (`pnpm build:component:types`).
|
||||
// The root tsconfig only type-checks; this one emits `.d.ts` files, and nothing
|
||||
// else, for everything the component's entry point reaches. The layout under
|
||||
// `dist/types` mirrors the repository (`component/index.d.ts`, `src/…`), which
|
||||
// is what `package.json` points its `types` at.
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"noEmit": false,
|
||||
"emitDeclarationOnly": true,
|
||||
"declaration": true,
|
||||
"declarationMap": false,
|
||||
"rootDir": "..",
|
||||
"outDir": "./dist/types"
|
||||
},
|
||||
// The entry point, plus the ambient declarations (CSS modules, `?react` SVGs,
|
||||
// `import.meta.env`, …) that the sources it reaches rely on.
|
||||
"include": ["./index.tsx", "../src/@types/*.d.ts"],
|
||||
"exclude": []
|
||||
}
|
||||
Reference in New Issue
Block a user