Skip to content

Commit

Permalink
Re-expose dist and types (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
nwalters512 authored Nov 15, 2024
1 parent cb78219 commit 2543c04
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
11 changes: 11 additions & 0 deletions .config/tsconfig.types.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
// This exists for backwards compatibility. In the wild, folks are importing
// paths like `@orchidjs/unicode-variants/dist/types/...`.
//
// Consider removing this in the next major version.
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../dist/types",
"emitDeclarationOnly": true
}
}
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,20 @@
"import": "./dist/esm/index.js",
"require": "./dist/cjs/index.js"
},
"./types/*": "./dist/types/*",
"./dist/*": "./dist/*",
"./package.json": "./package.json"
},
"scripts": {
"pretest": "npm run build",
"test": "jest --coverage",
"test:types": "attw --pack .",
"bench": "npx 0x -- node --zero-fill-buffers bench.mjs",
"build": "rm -rf dist && npm run build:esm && npm run build:cjs && npm run build:umd",
"build": "rm -rf dist && npm run build:esm && npm run build:cjs && npm run build:umd && npm run build:types",
"build:esm": "tsc -p .config/tsconfig.esm.json",
"build:cjs": "tsc -p .config/tsconfig.cjs.json && echo '{\"type\":\"commonjs\"}' > ./dist/cjs/package.json",
"build:umd": "npx rollup -c .config/rollup.config.mjs"
"build:umd": "npx rollup -c .config/rollup.config.mjs",
"build:types": "tsc -p .config/tsconfig.types.json"
},
"keywords": [
"unicode",
Expand Down

0 comments on commit 2543c04

Please sign in to comment.