Skip to content

Commit 1ed0e2f

Browse files
authored
fix: Properly package for publishing (#8)
1 parent 1f7dbe6 commit 1ed0e2f

File tree

7 files changed

+24
-19
lines changed

7 files changed

+24
-19
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# TS build dir
2-
out/
2+
dist/*
3+
!dist/.npmignore
34

45
# Coverage
56
coverage/

.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Ignore artifacts:
2-
out
2+
dist
33
coverage
44

55
# Ignore changelog since auto-updated by standard-version

dist/.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Using "files" whitelist in package.json, but root-level .npmignore will not work :(
2+
__tests__

index.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
1-
import { DeepMap } from './src/map';
2-
import { DeepSet } from './src/set';
3-
4-
export { DeepMap };
5-
export { DeepSet };
1+
export { DeepMap } from './src/map';
2+
export { DeepSet } from './src/set';

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22
"name": "deep-equality-data-structures",
33
"version": "1.0.1",
44
"description": "Javascript data structures (e.g., Map, Set) that support deep object equality",
5-
"main": "index.ts",
5+
"main": "dist/index.js",
6+
"types": "dist/index.d.ts",
7+
"files": [
8+
"/dist"
9+
],
610
"scripts": {
7-
"prepare": "husky install",
11+
"prepare": "husky install && npm run compile",
812
"_lint": "eslint --fix",
913
"_lint:check": "eslint",
1014
"_format": " prettier --write --ignore-unknown",
@@ -40,7 +44,7 @@
4044
},
4145
"homepage": "https://github.com/adamhamlin/deep-equality-data-structures#readme",
4246
"devDependencies": {
43-
"@adamhamlin/eslint-config": "^1.2.0",
47+
"@adamhamlin/eslint-config": "^1.3.0",
4448
"@tsconfig/recommended": "^1.0.1",
4549
"@types/jest": "^29.2.3",
4650
"@types/object-hash": "^2.2.1",

tsconfig.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"extends": "@tsconfig/recommended/tsconfig.json",
33
"compilerOptions": {
4-
"outDir": "./out"
4+
"outDir": "./dist",
5+
"declaration": true
56
},
6-
"exclude": ["node_modules"]
7+
"exclude": ["node_modules", "dist/**/*"]
78
}

0 commit comments

Comments
 (0)