Add basic TS config for BBUI
This commit is contained in:
parent
01a47bbd22
commit
65ef56e416
|
@ -3,7 +3,7 @@
|
|||
"description": "A UI solution used in the different Budibase projects.",
|
||||
"version": "0.0.0",
|
||||
"license": "MPL-2.0",
|
||||
"svelte": "src/index.js",
|
||||
"svelte": "src/index.ts",
|
||||
"module": "dist/bbui.mjs",
|
||||
"exports": {
|
||||
".": {
|
||||
|
@ -14,7 +14,8 @@
|
|||
"./spectrum-icons-vite.js": "./src/spectrum-icons-vite.js"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "vite build"
|
||||
"build": "vite build",
|
||||
"dev": "vite build --watch --mode=dev"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@sveltejs/vite-plugin-svelte": "1.4.0",
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
declare module "./helpers" {
|
||||
export const cloneDeep: <T>(obj: T) => T
|
||||
export const copyToClipboard: (value: any) => Promise<void>
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
const { vitePreprocess } = require("@sveltejs/vite-plugin-svelte")
|
||||
|
||||
const config = {
|
||||
preprocess: vitePreprocess(),
|
||||
}
|
||||
|
||||
module.exports = config
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"extends": "../../tsconfig.build.json",
|
||||
"compilerOptions": {
|
||||
"allowJs": true,
|
||||
"outDir": "./dist",
|
||||
"lib": ["ESNext"],
|
||||
"baseUrl": ".",
|
||||
},
|
||||
"include": ["./src/**/*"],
|
||||
"exclude": ["node_modules", "**/*.json", "**/*.spec.ts", "**/*.spec.js"]
|
||||
}
|
|
@ -9,7 +9,7 @@ export default defineConfig(({ mode }) => {
|
|||
build: {
|
||||
sourcemap: !isProduction,
|
||||
lib: {
|
||||
entry: "src/index.js",
|
||||
entry: "src/index.ts",
|
||||
formats: ["es"],
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue