Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add ts support for offchain #6

Merged
merged 2 commits into from
Oct 17, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the rename necessary here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didnt try tsup with a JS file before, just tried it once and it works. So just pushed rename back to .js

File renamed without changes.
19 changes: 15 additions & 4 deletions off-chain/package.json
Original file line number Diff line number Diff line change
@@ -15,19 +15,30 @@
"cardano"
],
"type": "module",
"module": "./lib/index.js",
"exports": "./lib/index.js",
"exports": {
".": {
"import": "./dist/index.js",
"require": "./dist/index.cjs",
"types": "./dist/index.d.ts"
}
},
"files": [
"dist/**"
],
"license": "MPL-2.0",
"scripts": {
"test": "ava",
"build": "tsup lib/index.ts --format esm,cjs --dts",
"docs": "jsdoc lib/* -d docs"
},
"devDependencies": {
"typescript": "^5.3.3",
"ava": "^6.1.3",
"jsdoc": "^4.0.3"
"jsdoc": "^4.0.3",
"tsup": "^8.0.2"
},
"dependencies": {
"blake2b": "^2.1.4",
"level": "^8.0.1"
}
}
}
27 changes: 27 additions & 0 deletions off-chain/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Default",
"compilerOptions": {
"declaration": true,
"declarationMap": true,
"esModuleInterop": true,
"incremental": false,
"isolatedModules": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"module": "ESNext",
"target": "ESNext",
"moduleResolution": "node",
"moduleDetection": "force",
"noUncheckedIndexedAccess": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"sourceMap": true,
"allowJs": true,
"allowSyntheticDefaultImports": true,
"noUnusedLocals": false,
"outDir": "dist"
},
"include": ["lib/**/*"],
"exclude": ["dist", "node_modules"]
}
803 changes: 797 additions & 6 deletions off-chain/yarn.lock

Large diffs are not rendered by default.