Start consolidating shared types in the monorepo (#34062)
* Start consolidating shared types in the monorepo * Iterate * Simplify api-extractor * Iterate * Fix lockfile
This commit is contained in:
@@ -67,7 +67,7 @@
|
||||
*
|
||||
* "bundledPackages": [ "@my-company/*" ],
|
||||
*/
|
||||
"bundledPackages": [],
|
||||
"bundledPackages": ["shared-types"],
|
||||
|
||||
/**
|
||||
* Specifies what type of newlines API Extractor should use when writing output files. By default, the output files
|
||||
|
||||
@@ -125,8 +125,10 @@ export type ComposerApiTarget = {
|
||||
view: "thread";
|
||||
};
|
||||
|
||||
// Warning: (ae-forgotten-export) The symbol "WebConfigJson" needs to be exported by the entry point index.d.ts
|
||||
//
|
||||
// @public
|
||||
export interface Config {
|
||||
export interface Config extends WebConfigJson {
|
||||
// (undocumented)
|
||||
brand: string;
|
||||
}
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
"matrix-widget-api": "^1.17.0",
|
||||
"rollup-plugin-external-globals": "^0.13.0",
|
||||
"semver": "^7.6.3",
|
||||
"shared-types": "workspace:*",
|
||||
"typescript": "catalog:",
|
||||
"unplugin-dts": "catalog:",
|
||||
"vite": "catalog:",
|
||||
|
||||
@@ -5,14 +5,10 @@
|
||||
"targets": {
|
||||
"build": {
|
||||
"cache": true,
|
||||
"executor": "nx:run-commands",
|
||||
"inputs": ["src"],
|
||||
"outputs": ["{projectRoot}/lib"],
|
||||
"options": {
|
||||
"commands": ["vite build", "api-extractor run"],
|
||||
"parallel": false,
|
||||
"cwd": "packages/module-api"
|
||||
}
|
||||
"command": "vite build",
|
||||
"options": { "cwd": "packages/module-api" }
|
||||
},
|
||||
"start": {
|
||||
"command": "vite build --watch",
|
||||
|
||||
@@ -5,16 +5,16 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { type WebConfigJson } from "shared-types";
|
||||
|
||||
/**
|
||||
* The configuration for the application.
|
||||
* Should be extended via declaration merging.
|
||||
* @public
|
||||
*/
|
||||
export interface Config {
|
||||
export interface Config extends WebConfigJson {
|
||||
// The branding name of the application
|
||||
brand: string;
|
||||
// Other config options are available but not specified in the types as that would make it difficult to change for element-web
|
||||
// they are accessible at runtime all the same, see list at https://github.com/element-hq/element-web/blob/develop/docs/config.md
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -27,7 +27,11 @@ export default defineConfig({
|
||||
sourcemap: true,
|
||||
},
|
||||
plugins: [
|
||||
dts(),
|
||||
dts({
|
||||
bundleTypes: {
|
||||
configPath: "./api-extractor.json",
|
||||
},
|
||||
}),
|
||||
externalGlobals({
|
||||
// Reuse React from the host app
|
||||
react: "window.React",
|
||||
|
||||
Reference in New Issue
Block a user