mirror of
https://github.com/gosticks/plane.git
synced 2025-10-16 12:45:33 +00:00
[WEB-4810] feat: migrate to tsdown from tsup (#7679)
* feat: migrat to tsdown to tsup * fix: build scripts * fix: lock file fixes * fix: adding build process to i18n and propel packages * fix: lint warning * chore: update services module entry points * fix: lock file * fix: lock file * fix: remove tsc from build * fix: tsdown configs * fix: remove tsc step from build process --------- Co-authored-by: Aaryan Khandelwal <aaryankhandu123@gmail.com> Co-authored-by: Aaron Reisman <aaron.reisman@plane.so>
This commit is contained in:
parent
91f0228b5f
commit
b99ddc24e7
@ -7,8 +7,8 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "tsup --watch --onSuccess 'node --env-file=.env dist/server.js'",
|
"build": "tsdown",
|
||||||
"build": "tsc --noEmit && tsup",
|
"dev": "tsdown --watch",
|
||||||
"start": "node --env-file=.env dist/server.js",
|
"start": "node --env-file=.env dist/server.js",
|
||||||
"check:lint": "eslint . --max-warnings 10",
|
"check:lint": "eslint . --max-warnings 10",
|
||||||
"check:types": "tsc --noEmit",
|
"check:types": "tsc --noEmit",
|
||||||
@ -58,7 +58,7 @@
|
|||||||
"concurrently": "^9.0.1",
|
"concurrently": "^9.0.1",
|
||||||
"nodemon": "^3.1.7",
|
"nodemon": "^3.1.7",
|
||||||
"ts-node": "^10.9.2",
|
"ts-node": "^10.9.2",
|
||||||
"tsup": "catalog:",
|
"tsdown": "catalog:",
|
||||||
"typescript": "catalog:",
|
"typescript": "catalog:",
|
||||||
"ws": "^8.18.3"
|
"ws": "^8.18.3"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,6 +21,6 @@
|
|||||||
"emitDecoratorMetadata": true,
|
"emitDecoratorMetadata": true,
|
||||||
"sourceRoot": "/"
|
"sourceRoot": "/"
|
||||||
},
|
},
|
||||||
"include": ["src/**/*.ts", "tsup.config.ts"],
|
"include": ["src/**/*.ts", "tsdown.config.ts"],
|
||||||
"exclude": ["./dist", "./build", "./node_modules"]
|
"exclude": ["./dist", "./build", "./node_modules"]
|
||||||
}
|
}
|
||||||
|
|||||||
7
apps/live/tsdown.config.ts
Normal file
7
apps/live/tsdown.config.ts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import { defineConfig } from "tsdown";
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
entry: ["src/server.ts"],
|
||||||
|
outDir: "dist",
|
||||||
|
format: ["esm", "cjs"],
|
||||||
|
});
|
||||||
@ -1,15 +0,0 @@
|
|||||||
import { defineConfig } from "tsup";
|
|
||||||
|
|
||||||
export default defineConfig({
|
|
||||||
entry: ["src/server.ts"],
|
|
||||||
format: ["esm", "cjs"],
|
|
||||||
dts: true,
|
|
||||||
splitting: false,
|
|
||||||
sourcemap: true,
|
|
||||||
minify: false,
|
|
||||||
target: "node18",
|
|
||||||
outDir: "dist",
|
|
||||||
env: {
|
|
||||||
NODE_ENV: process.env.NODE_ENV || "development",
|
|
||||||
},
|
|
||||||
});
|
|
||||||
@ -17,8 +17,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "tsup --watch",
|
"dev": "tsdown --watch",
|
||||||
"build": "tsc --noEmit && tsup",
|
"build": "tsdown",
|
||||||
"check:lint": "eslint . --max-warnings 0",
|
"check:lint": "eslint . --max-warnings 0",
|
||||||
"check:types": "tsc --noEmit",
|
"check:types": "tsc --noEmit",
|
||||||
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"",
|
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"",
|
||||||
@ -34,7 +34,7 @@
|
|||||||
"@plane/typescript-config": "workspace:*",
|
"@plane/typescript-config": "workspace:*",
|
||||||
"@types/node": "^22.5.4",
|
"@types/node": "^22.5.4",
|
||||||
"@types/react": "catalog:",
|
"@types/react": "catalog:",
|
||||||
"tsup": "catalog:",
|
"tsdown": "catalog:",
|
||||||
"typescript": "catalog:"
|
"typescript": "catalog:"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
7
packages/constants/tsdown.config.ts
Normal file
7
packages/constants/tsdown.config.ts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import { defineConfig } from "tsdown";
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
entry: ["src/index.ts"],
|
||||||
|
outDir: "dist",
|
||||||
|
format: ["esm", "cjs"],
|
||||||
|
});
|
||||||
@ -1,13 +0,0 @@
|
|||||||
import { defineConfig } from "tsup";
|
|
||||||
|
|
||||||
export default defineConfig({
|
|
||||||
entry: ["src/index.ts"],
|
|
||||||
outDir: "dist",
|
|
||||||
format: ["esm", "cjs"],
|
|
||||||
dts: true,
|
|
||||||
clean: true,
|
|
||||||
minify: true,
|
|
||||||
splitting: true,
|
|
||||||
treeshake: true,
|
|
||||||
external: ["@plane/types"],
|
|
||||||
});
|
|
||||||
@ -11,8 +11,8 @@
|
|||||||
"dist/**"
|
"dist/**"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc --noEmit && tsup --minify",
|
"build": "tsdown",
|
||||||
"dev": "tsup --watch",
|
"dev": "tsdown --watch",
|
||||||
"check:lint": "eslint . --max-warnings 1",
|
"check:lint": "eslint . --max-warnings 1",
|
||||||
"check:types": "tsc --noEmit",
|
"check:types": "tsc --noEmit",
|
||||||
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"",
|
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"",
|
||||||
@ -27,7 +27,7 @@
|
|||||||
"@types/node": "^20.14.9",
|
"@types/node": "^20.14.9",
|
||||||
"@types/ws": "^8.5.10",
|
"@types/ws": "^8.5.10",
|
||||||
"reflect-metadata": "^0.2.2",
|
"reflect-metadata": "^0.2.2",
|
||||||
"tsup": "catalog:",
|
"tsdown": "catalog:",
|
||||||
"typescript": "catalog:"
|
"typescript": "catalog:"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
7
packages/decorators/tsdown.config.ts
Normal file
7
packages/decorators/tsdown.config.ts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import { defineConfig } from "tsdown";
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
entry: ["src/index.ts"],
|
||||||
|
outDir: "dist",
|
||||||
|
format: ["esm", "cjs"],
|
||||||
|
});
|
||||||
@ -22,8 +22,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc && tsup --minify",
|
"build": "tsdown",
|
||||||
"dev": "tsup --watch",
|
"dev": "tsdown --watch",
|
||||||
"check:lint": "eslint . --max-warnings 30",
|
"check:lint": "eslint . --max-warnings 30",
|
||||||
"check:types": "tsc --noEmit",
|
"check:types": "tsc --noEmit",
|
||||||
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"",
|
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"",
|
||||||
@ -88,7 +88,7 @@
|
|||||||
"@types/react": "catalog:",
|
"@types/react": "catalog:",
|
||||||
"@types/react-dom": "catalog:",
|
"@types/react-dom": "catalog:",
|
||||||
"postcss": "^8.4.38",
|
"postcss": "^8.4.38",
|
||||||
"tsup": "catalog:",
|
"tsdown": "catalog:",
|
||||||
"typescript": "catalog:"
|
"typescript": "catalog:"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|||||||
7
packages/editor/tsdown.config.ts
Normal file
7
packages/editor/tsdown.config.ts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import { defineConfig } from "tsdown";
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
entry: ["src/index.ts", "src/lib.ts"],
|
||||||
|
outDir: "dist",
|
||||||
|
format: ["esm", "cjs"],
|
||||||
|
});
|
||||||
@ -1,14 +0,0 @@
|
|||||||
import { defineConfig } from "tsup";
|
|
||||||
|
|
||||||
export default defineConfig({
|
|
||||||
entry: ["src/index.ts", "src/lib.ts"],
|
|
||||||
outDir: "dist",
|
|
||||||
format: ["esm", "cjs"],
|
|
||||||
dts: true,
|
|
||||||
clean: true,
|
|
||||||
external: ["react", "react-dom"],
|
|
||||||
injectStyle: true,
|
|
||||||
splitting: true,
|
|
||||||
treeshake: true,
|
|
||||||
minify: true,
|
|
||||||
});
|
|
||||||
@ -11,8 +11,8 @@
|
|||||||
"dist/**"
|
"dist/**"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsup --minify",
|
"build": "tsdown",
|
||||||
"dev": "tsup --watch",
|
"dev": "tsdown --watch",
|
||||||
"check:lint": "eslint . --max-warnings 6",
|
"check:lint": "eslint . --max-warnings 6",
|
||||||
"check:types": "tsc --noEmit",
|
"check:types": "tsc --noEmit",
|
||||||
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"",
|
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"",
|
||||||
@ -28,7 +28,7 @@
|
|||||||
"@plane/typescript-config": "workspace:*",
|
"@plane/typescript-config": "workspace:*",
|
||||||
"@types/node": "^22.5.4",
|
"@types/node": "^22.5.4",
|
||||||
"@types/react": "catalog:",
|
"@types/react": "catalog:",
|
||||||
"tsup": "catalog:",
|
"tsdown": "catalog:",
|
||||||
"typescript": "catalog:"
|
"typescript": "catalog:"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,12 +1,11 @@
|
|||||||
import { defineConfig } from "tsup";
|
import { defineConfig } from "tsdown";
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
entry: ["src/index.ts"],
|
entry: ["src/index.ts"],
|
||||||
outDir: "dist",
|
outDir: "dist",
|
||||||
format: ["esm", "cjs"],
|
format: ["esm", "cjs"],
|
||||||
|
external: ["react", "react-dom"],
|
||||||
dts: true,
|
dts: true,
|
||||||
|
sourcemap: true,
|
||||||
clean: true,
|
clean: true,
|
||||||
minify: true,
|
|
||||||
external: ["express", "ws"],
|
|
||||||
treeshake: true,
|
|
||||||
});
|
});
|
||||||
@ -1,13 +0,0 @@
|
|||||||
import { defineConfig } from "tsup";
|
|
||||||
|
|
||||||
export default defineConfig({
|
|
||||||
entry: ["src/index.ts"],
|
|
||||||
outDir: "dist",
|
|
||||||
format: ["esm", "cjs"],
|
|
||||||
dts: true,
|
|
||||||
clean: true,
|
|
||||||
minify: true,
|
|
||||||
splitting: true,
|
|
||||||
treeshake: true,
|
|
||||||
external: ["react"],
|
|
||||||
});
|
|
||||||
@ -4,10 +4,13 @@
|
|||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"description": "I18n shared across multiple apps internally",
|
"description": "I18n shared across multiple apps internally",
|
||||||
"private": true,
|
"private": true,
|
||||||
"main": "./src/index.ts",
|
"main": "./dist/index.js",
|
||||||
"types": "./src/index.ts",
|
"module": "./dist/index.mjs",
|
||||||
|
"types": "./dist/index.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"check:lint": "eslint . --max-warnings 0",
|
"dev": "tsdown --watch",
|
||||||
|
"build": "tsdown",
|
||||||
|
"check:lint": "eslint . --max-warnings 2",
|
||||||
"check:types": "tsc --noEmit",
|
"check:types": "tsc --noEmit",
|
||||||
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"",
|
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"",
|
||||||
"fix:lint": "eslint . --fix",
|
"fix:lint": "eslint . --fix",
|
||||||
@ -19,7 +22,8 @@
|
|||||||
"intl-messageformat": "^10.7.11",
|
"intl-messageformat": "^10.7.11",
|
||||||
"mobx": "catalog:",
|
"mobx": "catalog:",
|
||||||
"mobx-react": "catalog:",
|
"mobx-react": "catalog:",
|
||||||
"lodash": "catalog:"
|
"lodash": "catalog:",
|
||||||
|
"react": "catalog:"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@plane/eslint-config": "workspace:*",
|
"@plane/eslint-config": "workspace:*",
|
||||||
@ -27,6 +31,7 @@
|
|||||||
"@types/node": "^22.5.4",
|
"@types/node": "^22.5.4",
|
||||||
"@types/lodash": "catalog:",
|
"@types/lodash": "catalog:",
|
||||||
"@types/react": "catalog:",
|
"@types/react": "catalog:",
|
||||||
|
"tsdown": "catalog:",
|
||||||
"typescript": "catalog:"
|
"typescript": "catalog:"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,3 +2,5 @@ export * from "./constants";
|
|||||||
export * from "./context";
|
export * from "./context";
|
||||||
export * from "./hooks";
|
export * from "./hooks";
|
||||||
export * from "./types";
|
export * from "./types";
|
||||||
|
export * from "./store";
|
||||||
|
export * from "./locales";
|
||||||
|
|||||||
105
packages/i18n/src/locales/index.ts
Normal file
105
packages/i18n/src/locales/index.ts
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
// Export all locale files to make them accessible from the package root
|
||||||
|
export { default as enCore } from "./en/core.json";
|
||||||
|
export { default as enTranslations } from "./en/translations.json";
|
||||||
|
export { default as enAccessibility } from "./en/accessibility.json";
|
||||||
|
export { default as enEditor } from "./en/editor.json";
|
||||||
|
|
||||||
|
// Export locale data for all supported languages
|
||||||
|
export const locales = {
|
||||||
|
en: {
|
||||||
|
core: () => import("./en/core.json"),
|
||||||
|
translations: () => import("./en/translations.json"),
|
||||||
|
accessibility: () => import("./en/accessibility.json"),
|
||||||
|
editor: () => import("./en/editor.json"),
|
||||||
|
},
|
||||||
|
fr: {
|
||||||
|
translations: () => import("./fr/translations.json"),
|
||||||
|
accessibility: () => import("./fr/accessibility.json"),
|
||||||
|
editor: () => import("./fr/editor.json"),
|
||||||
|
},
|
||||||
|
es: {
|
||||||
|
translations: () => import("./es/translations.json"),
|
||||||
|
accessibility: () => import("./es/accessibility.json"),
|
||||||
|
editor: () => import("./es/editor.json"),
|
||||||
|
},
|
||||||
|
ja: {
|
||||||
|
translations: () => import("./ja/translations.json"),
|
||||||
|
accessibility: () => import("./ja/accessibility.json"),
|
||||||
|
editor: () => import("./ja/editor.json"),
|
||||||
|
},
|
||||||
|
"zh-CN": {
|
||||||
|
translations: () => import("./zh-CN/translations.json"),
|
||||||
|
accessibility: () => import("./zh-CN/accessibility.json"),
|
||||||
|
editor: () => import("./zh-CN/editor.json"),
|
||||||
|
},
|
||||||
|
"zh-TW": {
|
||||||
|
translations: () => import("./zh-TW/translations.json"),
|
||||||
|
accessibility: () => import("./zh-TW/accessibility.json"),
|
||||||
|
editor: () => import("./zh-TW/editor.json"),
|
||||||
|
},
|
||||||
|
ru: {
|
||||||
|
translations: () => import("./ru/translations.json"),
|
||||||
|
accessibility: () => import("./ru/accessibility.json"),
|
||||||
|
editor: () => import("./ru/editor.json"),
|
||||||
|
},
|
||||||
|
it: {
|
||||||
|
translations: () => import("./it/translations.json"),
|
||||||
|
accessibility: () => import("./it/accessibility.json"),
|
||||||
|
editor: () => import("./it/editor.json"),
|
||||||
|
},
|
||||||
|
cs: {
|
||||||
|
translations: () => import("./cs/translations.json"),
|
||||||
|
accessibility: () => import("./cs/accessibility.json"),
|
||||||
|
editor: () => import("./cs/editor.json"),
|
||||||
|
},
|
||||||
|
sk: {
|
||||||
|
translations: () => import("./sk/translations.json"),
|
||||||
|
accessibility: () => import("./sk/accessibility.json"),
|
||||||
|
editor: () => import("./sk/editor.json"),
|
||||||
|
},
|
||||||
|
de: {
|
||||||
|
translations: () => import("./de/translations.json"),
|
||||||
|
accessibility: () => import("./de/accessibility.json"),
|
||||||
|
editor: () => import("./de/editor.json"),
|
||||||
|
},
|
||||||
|
ua: {
|
||||||
|
translations: () => import("./ua/translations.json"),
|
||||||
|
accessibility: () => import("./ua/accessibility.json"),
|
||||||
|
editor: () => import("./ua/editor.json"),
|
||||||
|
},
|
||||||
|
pl: {
|
||||||
|
translations: () => import("./pl/translations.json"),
|
||||||
|
accessibility: () => import("./pl/accessibility.json"),
|
||||||
|
editor: () => import("./pl/editor.json"),
|
||||||
|
},
|
||||||
|
ko: {
|
||||||
|
translations: () => import("./ko/translations.json"),
|
||||||
|
accessibility: () => import("./ko/accessibility.json"),
|
||||||
|
editor: () => import("./ko/editor.json"),
|
||||||
|
},
|
||||||
|
"pt-BR": {
|
||||||
|
translations: () => import("./pt-BR/translations.json"),
|
||||||
|
accessibility: () => import("./pt-BR/accessibility.json"),
|
||||||
|
editor: () => import("./pt-BR/editor.json"),
|
||||||
|
},
|
||||||
|
id: {
|
||||||
|
translations: () => import("./id/translations.json"),
|
||||||
|
accessibility: () => import("./id/accessibility.json"),
|
||||||
|
editor: () => import("./id/editor.json"),
|
||||||
|
},
|
||||||
|
ro: {
|
||||||
|
translations: () => import("./ro/translations.json"),
|
||||||
|
accessibility: () => import("./ro/accessibility.json"),
|
||||||
|
editor: () => import("./ro/editor.json"),
|
||||||
|
},
|
||||||
|
"vi-VN": {
|
||||||
|
translations: () => import("./vi-VN/translations.json"),
|
||||||
|
accessibility: () => import("./vi-VN/accessibility.json"),
|
||||||
|
editor: () => import("./vi-VN/editor.json"),
|
||||||
|
},
|
||||||
|
"tr-TR": {
|
||||||
|
translations: () => import("./tr-TR/translations.json"),
|
||||||
|
accessibility: () => import("./tr-TR/accessibility.json"),
|
||||||
|
editor: () => import("./tr-TR/editor.json"),
|
||||||
|
},
|
||||||
|
};
|
||||||
@ -5,7 +5,7 @@ import { makeAutoObservable, runInAction } from "mobx";
|
|||||||
// constants
|
// constants
|
||||||
import { FALLBACK_LANGUAGE, SUPPORTED_LANGUAGES, LANGUAGE_STORAGE_KEY, ETranslationFiles } from "../constants";
|
import { FALLBACK_LANGUAGE, SUPPORTED_LANGUAGES, LANGUAGE_STORAGE_KEY, ETranslationFiles } from "../constants";
|
||||||
// core translations imports
|
// core translations imports
|
||||||
import coreEn from "../locales/en/core.json";
|
import { enCore, locales } from "../locales";
|
||||||
// types
|
// types
|
||||||
import { TLanguage, ILanguageOption, ITranslations } from "../types";
|
import { TLanguage, ILanguageOption, ITranslations } from "../types";
|
||||||
|
|
||||||
@ -17,7 +17,7 @@ import { TLanguage, ILanguageOption, ITranslations } from "../types";
|
|||||||
export class TranslationStore {
|
export class TranslationStore {
|
||||||
// Core translations that are always loaded
|
// Core translations that are always loaded
|
||||||
private coreTranslations: ITranslations = {
|
private coreTranslations: ITranslations = {
|
||||||
en: coreEn,
|
en: enCore,
|
||||||
};
|
};
|
||||||
// List of translations for each language
|
// List of translations for each language
|
||||||
private translations: ITranslations = {};
|
private translations: ITranslations = {};
|
||||||
@ -138,10 +138,24 @@ export class TranslationStore {
|
|||||||
*/
|
*/
|
||||||
private async importAndMergeFiles(language: TLanguage, files: string[]) {
|
private async importAndMergeFiles(language: TLanguage, files: string[]) {
|
||||||
try {
|
try {
|
||||||
const importPromises = files.map((file) => import(`../locales/${language}/${file}.json`));
|
const localeData = locales[language as keyof typeof locales];
|
||||||
|
if (!localeData) {
|
||||||
|
throw new Error(`Locale data not found for language: ${language}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Filter out files that don't exist for this language
|
||||||
|
const availableFiles = files.filter((file) => {
|
||||||
|
const fileKey = file as keyof typeof localeData;
|
||||||
|
return fileKey in localeData;
|
||||||
|
});
|
||||||
|
|
||||||
|
const importPromises = availableFiles.map((file) => {
|
||||||
|
const fileKey = file as keyof typeof localeData;
|
||||||
|
return localeData[fileKey]();
|
||||||
|
});
|
||||||
|
|
||||||
const modules = await Promise.all(importPromises);
|
const modules = await Promise.all(importPromises);
|
||||||
const merged = modules.reduce((acc, module) => merge(acc, module.default), {});
|
const merged = modules.reduce((acc: any, module: any) => merge(acc, module.default), {});
|
||||||
return { default: merged };
|
return { default: merged };
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw new Error(`Failed to import and merge files for ${language}: ${error}`);
|
throw new Error(`Failed to import and merge files for ${language}: ${error}`);
|
||||||
|
|||||||
10
packages/i18n/tsdown.config.ts
Normal file
10
packages/i18n/tsdown.config.ts
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import { defineConfig } from "tsdown";
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
entry: ["src/index.ts"],
|
||||||
|
outDir: "dist",
|
||||||
|
format: ["esm", "cjs"],
|
||||||
|
dts: true,
|
||||||
|
external: ["react", "lodash", "mobx", "mobx-react", "intl-messageformat"],
|
||||||
|
sourcemap: true,
|
||||||
|
});
|
||||||
@ -18,8 +18,8 @@
|
|||||||
"dist/**"
|
"dist/**"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsup --minify",
|
"build": "tsdown",
|
||||||
"dev": "tsup --watch",
|
"dev": "tsdown --watch",
|
||||||
"check:lint": "eslint . --max-warnings 0",
|
"check:lint": "eslint . --max-warnings 0",
|
||||||
"check:types": "tsc --noEmit",
|
"check:types": "tsc --noEmit",
|
||||||
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"",
|
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"",
|
||||||
@ -36,7 +36,7 @@
|
|||||||
"@plane/typescript-config": "workspace:*",
|
"@plane/typescript-config": "workspace:*",
|
||||||
"@types/express": "^4.17.21",
|
"@types/express": "^4.17.21",
|
||||||
"@types/node": "^20.14.9",
|
"@types/node": "^20.14.9",
|
||||||
"tsup": "catalog:",
|
"tsdown": "catalog:",
|
||||||
"typescript": "catalog:"
|
"typescript": "catalog:"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
import { defineConfig } from "tsup";
|
import { defineConfig } from "tsdown";
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
entry: ["src/index.ts"],
|
entry: ["src/index.ts"],
|
||||||
outDir: "dist",
|
outDir: "dist",
|
||||||
format: ["esm", "cjs"],
|
format: ["esm", "cjs"],
|
||||||
dts: true,
|
dts: true,
|
||||||
|
sourcemap: true,
|
||||||
clean: true,
|
clean: true,
|
||||||
minify: true,
|
|
||||||
});
|
});
|
||||||
@ -1,13 +0,0 @@
|
|||||||
import { defineConfig } from "tsup";
|
|
||||||
|
|
||||||
export default defineConfig({
|
|
||||||
entry: ["src/index.ts"],
|
|
||||||
outDir: "dist",
|
|
||||||
format: ["esm", "cjs"],
|
|
||||||
dts: true,
|
|
||||||
clean: true,
|
|
||||||
minify: true,
|
|
||||||
splitting: true,
|
|
||||||
treeshake: true,
|
|
||||||
external: ["winston", "winston-daily-rotate-file"],
|
|
||||||
});
|
|
||||||
@ -4,6 +4,8 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"dev": "tsdown --watch",
|
||||||
|
"build": "tsdown",
|
||||||
"check:lint": "eslint . --max-warnings 7",
|
"check:lint": "eslint . --max-warnings 7",
|
||||||
"check:types": "tsc --noEmit",
|
"check:types": "tsc --noEmit",
|
||||||
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"",
|
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"",
|
||||||
@ -57,6 +59,7 @@
|
|||||||
"@types/react-dom": "catalog:",
|
"@types/react-dom": "catalog:",
|
||||||
"eslint-plugin-storybook": "^9.1.2",
|
"eslint-plugin-storybook": "^9.1.2",
|
||||||
"storybook": "^9.1.2",
|
"storybook": "^9.1.2",
|
||||||
|
"tsdown": "catalog:",
|
||||||
"typescript": "catalog:"
|
"typescript": "catalog:"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
21
packages/propel/tsdown.config.ts
Normal file
21
packages/propel/tsdown.config.ts
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
import { defineConfig } from "tsdown";
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
entry: [
|
||||||
|
"src/avatar/index.ts",
|
||||||
|
"src/charts/index.ts",
|
||||||
|
"src/dialog/index.ts",
|
||||||
|
"src/menu/index.ts",
|
||||||
|
"src/table/index.ts",
|
||||||
|
"src/tabs/index.ts",
|
||||||
|
"src/popover/index.ts",
|
||||||
|
"src/command/index.ts",
|
||||||
|
"src/combobox/index.ts",
|
||||||
|
"src/tooltip/index.ts",
|
||||||
|
"src/card/index.ts",
|
||||||
|
"src/switch/index.ts",
|
||||||
|
],
|
||||||
|
outDir: "dist",
|
||||||
|
format: ["esm", "cjs"],
|
||||||
|
dts: true,
|
||||||
|
});
|
||||||
@ -3,10 +3,15 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"main": "./src/index.ts",
|
"main": "./dist/index.js",
|
||||||
|
"module": "./dist/index.mjs",
|
||||||
|
"types": "./dist/index.d.ts",
|
||||||
|
"files": [
|
||||||
|
"dist/**"
|
||||||
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc --noEmit && tsup --minify",
|
"build": "tsdown",
|
||||||
"dev": "tsup --watch",
|
"dev": "tsdown --watch",
|
||||||
"check:lint": "eslint . --max-warnings 62",
|
"check:lint": "eslint . --max-warnings 62",
|
||||||
"check:types": "tsc --noEmit",
|
"check:types": "tsc --noEmit",
|
||||||
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"",
|
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"",
|
||||||
@ -22,7 +27,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@plane/eslint-config": "workspace:*",
|
"@plane/eslint-config": "workspace:*",
|
||||||
"@plane/typescript-config": "workspace:*",
|
"@plane/typescript-config": "workspace:*",
|
||||||
"tsup": "catalog:",
|
"tsdown": "catalog:",
|
||||||
"typescript": "catalog:"
|
"typescript": "catalog:"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
7
packages/services/tsdown.config.ts
Normal file
7
packages/services/tsdown.config.ts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import { defineConfig } from "tsdown";
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
entry: ["src/index.ts"],
|
||||||
|
outDir: "dist",
|
||||||
|
format: ["esm", "cjs"],
|
||||||
|
});
|
||||||
@ -1,13 +0,0 @@
|
|||||||
import { defineConfig } from "tsup";
|
|
||||||
|
|
||||||
export default defineConfig({
|
|
||||||
entry: ["src/index.ts"],
|
|
||||||
outDir: "dist",
|
|
||||||
format: ["esm", "cjs"],
|
|
||||||
dts: true,
|
|
||||||
clean: true,
|
|
||||||
minify: true,
|
|
||||||
splitting: true,
|
|
||||||
treeshake: true,
|
|
||||||
external: ["axios"],
|
|
||||||
});
|
|
||||||
@ -17,8 +17,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "tsup --watch",
|
"dev": "tsdown --watch",
|
||||||
"build": "tsc --noEmit && tsup --minify",
|
"build": "tsdown",
|
||||||
"check:lint": "eslint . --max-warnings 36",
|
"check:lint": "eslint . --max-warnings 36",
|
||||||
"check:types": "tsc --noEmit",
|
"check:types": "tsc --noEmit",
|
||||||
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"",
|
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"",
|
||||||
@ -35,7 +35,7 @@
|
|||||||
"@plane/typescript-config": "workspace:*",
|
"@plane/typescript-config": "workspace:*",
|
||||||
"@types/react": "catalog:",
|
"@types/react": "catalog:",
|
||||||
"@types/react-dom": "catalog:",
|
"@types/react-dom": "catalog:",
|
||||||
"tsup": "catalog:",
|
"tsdown": "catalog:",
|
||||||
"typescript": "catalog:"
|
"typescript": "catalog:"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
7
packages/types/tsdown.config.ts
Normal file
7
packages/types/tsdown.config.ts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import { defineConfig } from "tsdown";
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
entry: ["src/index.ts"],
|
||||||
|
outDir: "dist",
|
||||||
|
format: ["esm", "cjs"],
|
||||||
|
});
|
||||||
@ -12,8 +12,8 @@
|
|||||||
"module": "./dist/index.mjs",
|
"module": "./dist/index.mjs",
|
||||||
"types": "./dist/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsup --minify",
|
"build": "tsdown",
|
||||||
"dev": "tsup --watch",
|
"dev": "tsdown --watch",
|
||||||
"storybook": "storybook dev -p 6006",
|
"storybook": "storybook dev -p 6006",
|
||||||
"build-storybook": "storybook build",
|
"build-storybook": "storybook build",
|
||||||
"postcss": "postcss styles/globals.css -o styles/output.css --watch",
|
"postcss": "postcss styles/globals.css -o styles/output.css --watch",
|
||||||
@ -76,7 +76,7 @@
|
|||||||
"postcss-cli": "^11.0.0",
|
"postcss-cli": "^11.0.0",
|
||||||
"postcss-nested": "^6.0.1",
|
"postcss-nested": "^6.0.1",
|
||||||
"storybook": "^8.1.1",
|
"storybook": "^8.1.1",
|
||||||
"tsup": "catalog:",
|
"tsdown": "catalog:",
|
||||||
"typescript": "catalog:"
|
"typescript": "catalog:"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
7
packages/ui/tsdown.config.ts
Normal file
7
packages/ui/tsdown.config.ts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import { defineConfig } from "tsdown";
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
entry: ["src/index.ts"],
|
||||||
|
outDir: "dist",
|
||||||
|
format: ["esm", "cjs"],
|
||||||
|
});
|
||||||
@ -1,14 +0,0 @@
|
|||||||
import { defineConfig } from "tsup";
|
|
||||||
|
|
||||||
export default defineConfig({
|
|
||||||
entry: ["src/index.ts"],
|
|
||||||
outDir: "dist",
|
|
||||||
format: ["esm", "cjs"],
|
|
||||||
dts: true,
|
|
||||||
clean: true,
|
|
||||||
minify: true,
|
|
||||||
splitting: true,
|
|
||||||
treeshake: true,
|
|
||||||
external: ["react", "@plane/types"],
|
|
||||||
injectStyle: true,
|
|
||||||
});
|
|
||||||
@ -11,8 +11,8 @@
|
|||||||
"dist"
|
"dist"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc --noEmit && tsup --minify",
|
"build": "tsdown",
|
||||||
"dev": "tsup --watch",
|
"dev": "tsdown --watch",
|
||||||
"check:lint": "eslint . --max-warnings 20",
|
"check:lint": "eslint . --max-warnings 20",
|
||||||
"check:types": "tsc --noEmit",
|
"check:types": "tsc --noEmit",
|
||||||
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"",
|
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"",
|
||||||
@ -40,7 +40,7 @@
|
|||||||
"@types/node": "^22.5.4",
|
"@types/node": "^22.5.4",
|
||||||
"@types/react": "catalog:",
|
"@types/react": "catalog:",
|
||||||
"@types/uuid": "^9.0.8",
|
"@types/uuid": "^9.0.8",
|
||||||
"tsup": "catalog:",
|
"tsdown": "catalog:",
|
||||||
"typescript": "catalog:"
|
"typescript": "catalog:"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
7
packages/utils/tsdown.config.ts
Normal file
7
packages/utils/tsdown.config.ts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import { defineConfig } from "tsdown";
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
entry: ["src/index.ts"],
|
||||||
|
outDir: "dist",
|
||||||
|
format: ["esm", "cjs"],
|
||||||
|
});
|
||||||
@ -1,13 +0,0 @@
|
|||||||
import { defineConfig } from "tsup";
|
|
||||||
|
|
||||||
export default defineConfig({
|
|
||||||
entry: ["src/index.ts"],
|
|
||||||
outDir: "dist",
|
|
||||||
format: ["esm", "cjs"],
|
|
||||||
dts: true,
|
|
||||||
clean: true,
|
|
||||||
minify: true,
|
|
||||||
splitting: true,
|
|
||||||
treeshake: true,
|
|
||||||
external: ["react"],
|
|
||||||
});
|
|
||||||
780
pnpm-lock.yaml
780
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
@ -20,7 +20,7 @@ catalog:
|
|||||||
"@types/react": 18.3.11
|
"@types/react": 18.3.11
|
||||||
"@types/react-dom": 18.3.1
|
"@types/react-dom": 18.3.1
|
||||||
typescript: 5.8.3
|
typescript: 5.8.3
|
||||||
tsup: 8.4.0
|
tsdown: 0.14.2
|
||||||
uuid: 10.0.0
|
uuid: 10.0.0
|
||||||
|
|
||||||
onlyBuiltDependencies:
|
onlyBuiltDependencies:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user