Skip to content

Commit

Permalink
fix: Properly package for publishing (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhamlin authored Dec 17, 2022
1 parent 1f7dbe6 commit 1ed0e2f
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 19 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# TS build dir
out/
dist/*
!dist/.npmignore

# Coverage
coverage/
Expand Down
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Ignore artifacts:
out
dist
coverage

# Ignore changelog since auto-updated by standard-version
Expand Down
2 changes: 2 additions & 0 deletions dist/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Using "files" whitelist in package.json, but root-level .npmignore will not work :(
__tests__
7 changes: 2 additions & 5 deletions index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
import { DeepMap } from './src/map';
import { DeepSet } from './src/set';

export { DeepMap };
export { DeepSet };
export { DeepMap } from './src/map';
export { DeepSet } from './src/set';
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
"name": "deep-equality-data-structures",
"version": "1.0.1",
"description": "Javascript data structures (e.g., Map, Set) that support deep object equality",
"main": "index.ts",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"/dist"
],
"scripts": {
"prepare": "husky install",
"prepare": "husky install && npm run compile",
"_lint": "eslint --fix",
"_lint:check": "eslint",
"_format": " prettier --write --ignore-unknown",
Expand Down Expand Up @@ -40,7 +44,7 @@
},
"homepage": "https://github.com/adamhamlin/deep-equality-data-structures#readme",
"devDependencies": {
"@adamhamlin/eslint-config": "^1.2.0",
"@adamhamlin/eslint-config": "^1.3.0",
"@tsconfig/recommended": "^1.0.1",
"@types/jest": "^29.2.3",
"@types/object-hash": "^2.2.1",
Expand Down
5 changes: 3 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"extends": "@tsconfig/recommended/tsconfig.json",
"compilerOptions": {
"outDir": "./out"
"outDir": "./dist",
"declaration": true
},
"exclude": ["node_modules"]
"exclude": ["node_modules", "dist/**/*"]
}

0 comments on commit 1ed0e2f

Please sign in to comment.