Skip to content

Commit 4410e49

Browse files
authored
refactor: use types consistently instead of typings (#130)
- since `typings` is now considered a legacy alias and can't be used inside of `exports`, update all references to consistently use `types` - `package.json#typings` -> `types` - `typings` folder -> `types` - for similar reasons, use consistent relative path `./` in `package.json` - so `types` matches `exports.types`, `main` matches `exports.require`, and `module` matches `exports.import` _exactly_
1 parent 82532f9 commit 4410e49

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
"name": "react-signature-canvas",
33
"version": "1.1.0-alpha.1",
44
"description": "A React wrapper component around signature_pad. 100% test coverage, types, examples, & more. Unopinionated and heavily updated fork of react-signature-pad",
5-
"source": "src/index.tsx",
6-
"main": "dist/index.umd.min.js",
7-
"module": "dist/index.mjs",
5+
"source": "./src/index.tsx",
6+
"main": "./dist/index.umd.min.js",
7+
"module": "./dist/index.mjs",
8+
"types": "./dist/index.d.ts",
89
"exports": {
910
"require": "./dist/index.umd.min.js",
1011
"default": "./dist/index.mjs",
1112
"types": "./dist/index.d.ts"
1213
},
13-
"typings": "dist/index.d.ts",
1414
"files": [
15-
"src/",
16-
"dist/"
15+
"./src/",
16+
"./dist/"
1717
],
1818
"author": "Anton Gilgur",
1919
"license": "Apache-2.0",

tsconfig.build.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// tsconfig.json is used for type-checking _all_ files, tsconfig.build.json is just used for the build
33
"extends": "./tsconfig.json",
44
// allowlist of files to build
5-
"files": ["src/index.tsx", "typings/trim-canvas.d.ts"],
5+
"files": ["src/index.tsx", "types/trim-canvas.d.ts"],
66
"compilerOptions": {
77
// override the base
88
"noEmit": false,
File renamed without changes.

0 commit comments

Comments
 (0)