mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-02-18 13:29:36 +01:00
build: export types for @excalidraw/utils (#7736)
* build: export types for @excalidraw/utils * fix * add types
This commit is contained in:
parent
99601baffc
commit
f207bd0a1c
3
packages/utils/global.d.ts
vendored
Normal file
3
packages/utils/global.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
/// <reference types="vite/client" />
|
||||
import "../excalidraw/global";
|
||||
import "../excalidraw/css";
|
@ -10,6 +10,7 @@
|
||||
"default": "./dist/prod/index.js"
|
||||
}
|
||||
},
|
||||
"types": "./dist/utils/index.d.ts",
|
||||
"files": [
|
||||
"dist/*"
|
||||
],
|
||||
@ -68,6 +69,7 @@
|
||||
"file-loader": "6.2.0",
|
||||
"sass-loader": "13.0.2",
|
||||
"ts-loader": "9.3.1",
|
||||
"typescript": "4.9.4",
|
||||
"webpack": "5.76.0",
|
||||
"webpack-bundle-analyzer": "4.5.0",
|
||||
"webpack-cli": "4.10.0"
|
||||
@ -75,8 +77,9 @@
|
||||
"bugs": "https://github.com/excalidraw/excalidraw/issues",
|
||||
"repository": "https://github.com/excalidraw/excalidraw",
|
||||
"scripts": {
|
||||
"gen:types": "rm -rf types && tsc",
|
||||
"build:umd": "cross-env NODE_ENV=production webpack --config webpack.prod.config.js",
|
||||
"build:esm": "rm -rf dist && node ../../scripts/buildUtils.js",
|
||||
"build:esm": "rm -rf dist && node ../../scripts/buildUtils.js && yarn gen:types",
|
||||
"build:umd:withAnalyzer": "cross-env NODE_ENV=production ANALYZER=true webpack --config webpack.prod.config.js",
|
||||
"pack": "yarn build:umd && yarn pack"
|
||||
}
|
||||
|
16
packages/utils/tsconfig.json
Normal file
16
packages/utils/tsconfig.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ESNext",
|
||||
"strict": true,
|
||||
"outDir": "dist",
|
||||
"skipLibCheck": true,
|
||||
"declaration": true,
|
||||
"emitDeclarationOnly": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Node",
|
||||
"resolveJsonModule": true,
|
||||
"jsx": "react-jsx"
|
||||
},
|
||||
"exclude": ["**/*.test.*", "**/tests/*", "types", "dist"]
|
||||
}
|
Loading…
Reference in New Issue
Block a user