Skip to content

Commit

Permalink
dont use ipjs and add package.json exports[].types
Browse files Browse the repository at this point in the history
  • Loading branch information
gobengo committed Dec 12, 2023
1 parent 11a7f0b commit b164adf
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
node_modules
coverage
dist
/types

24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@
"types": "./types/index.d.ts",
"type": "module",
"scripts": {
"build": "npm run build:js && npm run build:types",
"build:js": "ipjs build --tests --main && npm run build:copy",
"build:copy": "cp -a tsconfig.json lib test dist/ ",
"build:types": "npm run build:copy && cd dist && tsc --build",
"test": "npm run lint && npm run test:node && npm run test:cjs",
"build": "npm run build:types",
"build:types": "tsc --build",
"test": "npm run lint && npm run test:node",
"test:node": "ava --verbose 'test/*.spec.js'",
"test:cjs": "npm run build:js && ava --verbose dist/cjs/node-test/*.spec.js",
"coverage": "c8 npm run test",
"lint": "standard"
},
Expand All @@ -29,7 +26,6 @@
"@web-std/blob": "^2.1.0",
"ava": "^3.15.0",
"c8": "^7.7.2",
"ipjs": "^5.0.0",
"ipld-garbage": "^4.0.1",
"standard": "^16.0.3",
"typescript": "^4.2.4"
Expand All @@ -41,16 +37,20 @@
},
"exports": {
".": {
"import": "./lib/index.js"
"import": "./lib/index.js",
"types": "./types/index.d.ts"
},
"./rooted": {
"import": "./lib/rooted/index.js"
"import": "./lib/rooted/index.js",
"types": "./types/rooted/index.d.ts"
},
"./simple": {
"import": "./lib/simple/index.js"
"import": "./lib/simple/index.js",
"types": "./types/simple/index.d.ts"
},
"./treewalk": {
"import": "./lib/treewalk/index.js"
"import": "./lib/treewalk/index.js",
"types": "./types/treewalk/index.d.ts"
}
},
"typesVersions": {
Expand Down Expand Up @@ -93,4 +93,4 @@
"split",
"splitter"
]
}
}
4 changes: 3 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@
"node_modules",
"esm",
"cjs",
"test"
"test",
"dist",
"./**/*.d.ts"
],
"compileOnSave": false
}

0 comments on commit b164adf

Please sign in to comment.