mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Add @excalidraw/element package
This commit is contained in:
parent
096a1233a6
commit
45ac15ab40
15 changed files with 137 additions and 121 deletions
19
packages/element/README.md
Normal file
19
packages/element/README.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
# @excalidraw/element
|
||||
|
||||
## Install
|
||||
|
||||
```bash
|
||||
npm install @excalidraw/element
|
||||
```
|
||||
|
||||
If you prefer Yarn over npm, use this command to install the Excalidraw utils package:
|
||||
|
||||
```bash
|
||||
yarn add @excalidraw/element
|
||||
```
|
||||
|
||||
With PNPM, similarly install the package with this command:
|
||||
|
||||
```bash
|
||||
pnpm add @excalidraw/element
|
||||
```
|
61
packages/element/package.json
Normal file
61
packages/element/package.json
Normal file
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
"name": "@excalidraw/element",
|
||||
"version": "0.1.0",
|
||||
"type": "module",
|
||||
"types": "./dist/types/element/index.d.ts",
|
||||
"main": "./dist/prod/index.js",
|
||||
"module": "./dist/prod/index.js",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/types/element/index.d.ts",
|
||||
"development": "./dist/dev/index.js",
|
||||
"production": "./dist/prod/index.js",
|
||||
"default": "./dist/prod/index.js"
|
||||
},
|
||||
"./*": {
|
||||
"types": "./../element/dist/types/element/*"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"dist/*"
|
||||
],
|
||||
"description": "Excalidraw elements-related logic",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"excalidraw",
|
||||
"excalidraw-utils"
|
||||
],
|
||||
"browserslist": {
|
||||
"production": [
|
||||
">0.2%",
|
||||
"not dead",
|
||||
"not ie <= 11",
|
||||
"not op_mini all",
|
||||
"not safari < 12",
|
||||
"not kaios <= 2.5",
|
||||
"not edge < 79",
|
||||
"not chrome < 70",
|
||||
"not and_uc < 13",
|
||||
"not samsung < 10"
|
||||
],
|
||||
"development": [
|
||||
"last 1 chrome version",
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
},
|
||||
"devDependencies": {
|
||||
},
|
||||
"bugs": "https://github.com/excalidraw/excalidraw/issues",
|
||||
"repository": "https://github.com/excalidraw/excalidraw",
|
||||
"scripts": {
|
||||
"gen:types": "rm -rf types && tsc",
|
||||
"build:esm": "rm -rf dist && node ../../scripts/buildShared.js && yarn gen:types"
|
||||
}
|
||||
}
|
||||
|
6
packages/element/tsconfig.json
Normal file
6
packages/element/tsconfig.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"extends": "../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./dist/types"
|
||||
}
|
||||
}
|
|
@ -1,24 +1,6 @@
|
|||
{
|
||||
"extends": "../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./dist/types",
|
||||
"target": "ESNext",
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"declaration": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Node",
|
||||
"resolveJsonModule": true,
|
||||
"jsx": "react-jsx",
|
||||
"emitDeclarationOnly": true,
|
||||
"paths": {
|
||||
"@excalidraw/excalidraw": ["../excalidraw/index.tsx"],
|
||||
"@excalidraw/utils": ["../utils/index.ts"],
|
||||
"@excalidraw/math": ["../math/index.ts"],
|
||||
"@excalidraw/excalidraw/*": ["../excalidraw/*"],
|
||||
"@excalidraw/utils/*": ["../utils/*"],
|
||||
"@excalidraw/math/*": ["../math/*"]
|
||||
}
|
||||
},
|
||||
"exclude": ["**/*.test.*", "tests", "types", "examples", "dist"]
|
||||
"outDir": "./dist/types"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,5 +17,3 @@ With PNPM, similarly install the package with this command:
|
|||
```bash
|
||||
pnpm add @excalidraw/math
|
||||
```
|
||||
|
||||
## API
|
||||
|
|
|
@ -54,6 +54,6 @@
|
|||
"repository": "https://github.com/excalidraw/excalidraw",
|
||||
"scripts": {
|
||||
"gen:types": "rm -rf types && tsc",
|
||||
"build:esm": "rm -rf dist && node ../../scripts/buildMath.js && yarn gen:types"
|
||||
"build:esm": "rm -rf dist && node ../../scripts/buildShared.js && yarn gen:types"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,24 +1,6 @@
|
|||
{
|
||||
"extends": "../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./dist/types",
|
||||
"target": "ESNext",
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"declaration": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Node",
|
||||
"resolveJsonModule": true,
|
||||
"jsx": "react-jsx",
|
||||
"emitDeclarationOnly": true,
|
||||
"paths": {
|
||||
"@excalidraw/excalidraw": ["../excalidraw/index.tsx"],
|
||||
"@excalidraw/utils": ["../utils/index.ts"],
|
||||
"@excalidraw/math": ["../math/index.ts"],
|
||||
"@excalidraw/excalidraw/*": ["../excalidraw/*"],
|
||||
"@excalidraw/utils/*": ["../utils/*"],
|
||||
"@excalidraw/math/*": ["../math/*"]
|
||||
}
|
||||
},
|
||||
"exclude": ["**/*.test.*", "tests", "types", "examples", "dist"]
|
||||
"outDir": "./dist/types"
|
||||
}
|
||||
}
|
||||
|
|
27
packages/tsconfig.base.json
Normal file
27
packages/tsconfig.base.json
Normal file
|
@ -0,0 +1,27 @@
|
|||
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ESNext",
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"declaration": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Node",
|
||||
"resolveJsonModule": true,
|
||||
"jsx": "react-jsx",
|
||||
"emitDeclarationOnly": true,
|
||||
"paths": {
|
||||
"@excalidraw/excalidraw": ["./excalidraw/index.tsx"],
|
||||
"@excalidraw/utils": ["./utils/index.ts"],
|
||||
"@excalidraw/math": ["./math/index.ts"],
|
||||
"@excalidraw/element": ["./element/index.ts"],
|
||||
"@excalidraw/excalidraw/*": ["./excalidraw/*"],
|
||||
"@excalidraw/utils/*": ["./utils/*"],
|
||||
"@excalidraw/math/*": ["./math/*"],
|
||||
"@excalidraw/element/*": ["./element/*"]
|
||||
}
|
||||
},
|
||||
"exclude": ["**/*.test.*", "tests", "types", "examples", "dist"]
|
||||
}
|
||||
|
|
@ -70,6 +70,6 @@
|
|||
"repository": "https://github.com/excalidraw/excalidraw",
|
||||
"scripts": {
|
||||
"gen:types": "rm -rf types && tsc",
|
||||
"build:esm": "rm -rf dist && node ../../scripts/buildUtils.js && yarn gen:types"
|
||||
"build:esm": "rm -rf dist && node ../../scripts/buildShared.js && yarn gen:types"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,24 +1,6 @@
|
|||
{
|
||||
"extends": "../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./dist/types",
|
||||
"target": "ESNext",
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"declaration": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Node",
|
||||
"resolveJsonModule": true,
|
||||
"jsx": "react-jsx",
|
||||
"emitDeclarationOnly": true,
|
||||
"paths": {
|
||||
"@excalidraw/excalidraw": ["../excalidraw/index.tsx"],
|
||||
"@excalidraw/utils": ["../utils/index.ts"],
|
||||
"@excalidraw/math": ["../math/index.ts"],
|
||||
"@excalidraw/excalidraw/*": ["../excalidraw/*"],
|
||||
"@excalidraw/utils/*": ["../utils/*"],
|
||||
"@excalidraw/math/*": ["../math/*"]
|
||||
}
|
||||
},
|
||||
"exclude": ["**/*.test.*", "tests", "types", "examples", "dist"]
|
||||
"outDir": "./dist/types"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue