web_lib

Common web application libraries
git clone https://radroots.dev/git/web_lib.git
Log | Files | Refs | LICENSE

commit 1dd4db47e6b3629a88862112b1f50aa6a7348ce6
Author: triesap <137732411+triesap@users.noreply.github.com>
Date:   Tue,  4 Mar 2025 07:20:57 +0000

Initial commit

Diffstat:
Autils-nostr/.gitignore | 46++++++++++++++++++++++++++++++++++++++++++++++
Autils-nostr/README.md | 1+
Autils-nostr/package.json | 34++++++++++++++++++++++++++++++++++
Autils-nostr/src/index.ts | 2++
Autils-nostr/tsconfig.json | 29+++++++++++++++++++++++++++++
Autils-nostr/tsup.config.ts | 11+++++++++++
6 files changed, 123 insertions(+), 0 deletions(-)

diff --git a/utils-nostr/.gitignore b/utils-nostr/.gitignore @@ -0,0 +1,46 @@ +# dependencies +node_modules +.pnp +.pnp.js + +# testing +coverage + +# svelte +.svelte-kit + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# turbo +.turbo + + +# Output +.output +/build +dist + +# local env files +.env* +!.env.example + + +# Vite +vite.config.js.timestamp-* +vite.config.ts.timestamp-* + +# local +.tmp* +.backup* +.dev* +.vscode +notes*.txt +notes*.md +git-diff.txt diff --git a/utils-nostr/README.md b/utils-nostr/README.md @@ -0,0 +1 @@ +# nostr util diff --git a/utils-nostr/package.json b/utils-nostr/package.json @@ -0,0 +1,33 @@ +{ + "name": "@radroots/nostr-util", + "version": "0.0.0", + "private": true, + "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", + "types": "dist/index.d.ts", + "exports": { + ".": { + "import": "./dist/index.js", + "require": "./dist/index.cjs" + } + }, + "scripts": { + "build": "tsup", + "dev": "tsup --watch", + "watch": "tsc -w" + }, + "devDependencies": { + "tsup": "^6.2.3", + "typescript": "^5.3.3" + }, + "publishConfig": { + "access": "public" + }, + "dependencies": { + "@noble/curves": "^1.6.0", + "@noble/hashes": "^1.4.0", + "@nostr-dev-kit/ndk": "^2.11.0", + "nostr-tools": "^2.10.4" + } +} +\ No newline at end of file diff --git a/utils-nostr/src/index.ts b/utils-nostr/src/index.ts @@ -0,0 +1 @@ +export const rad = `roots` +\ No newline at end of file diff --git a/utils-nostr/tsconfig.json b/utils-nostr/tsconfig.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "strict": true, + "target": "es2021", + "lib": [ + "es2021", + "dom" + ], + "module": "ESNext", + "moduleResolution": "node", + "declaration": true, + "declarationMap": true, + "outDir": "./dist", + "esModuleInterop": true, + "skipLibCheck": true, + "baseUrl": ".", + "paths": { + "$root": ["src/index.js"] + } + }, + "include": [ + "src" + ], + "exclude": [ + "node_modules", + "dist" + ], +} +\ No newline at end of file diff --git a/utils-nostr/tsup.config.ts b/utils-nostr/tsup.config.ts @@ -0,0 +1,11 @@ +import { defineConfig } from "tsup"; + +export default defineConfig({ + entry: ['src/index.ts'], + format: ['esm', 'cjs'], + dts: true, + outDir: 'dist', + splitting: false, + clean: true, + sourcemap: true, +});