mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-10-29 16:17:39 +09:00
Right now our build and CI take a lot of time. 1:40min - 2min on CI and 1min locally. We spend time on vercel, on main CI, on publish and locally. At the moment in packages anything outside of src folder is not checked because of rootDir. We have to generate "references" field on precommit. All these issues can be avoided if remove .d.ts generation completely and specify sources in "types" field. This way we get zero build time for types and can switch to other build tool (like esbuild) for .js generation and get almost instant build on vercel, on main CI and on publish. Downsides - it can be slower (actually not really caz we delete .tsbuildinfo cache anyway and we can still generate it with incremental flag) - it contraditcs recommended practices for published packages (we can generate .d.ts in publish script only and use "types" as source internally)
9 lines
197 B
TypeScript
9 lines
197 B
TypeScript
declare module "detect-font" {
|
|
type Options = {
|
|
text?: string;
|
|
fontSize?: number;
|
|
baseFont?: string;
|
|
};
|
|
export function detectFont(element: Element, options?: Options): string;
|
|
}
|