Skip to content

Commit ab6c20b

Browse files
committed
feat: Add webpack support for browser usage
- Add webpack configuration for browser bundle - Create browser-specific entry point - Add TypeScript configuration for browser builds - Include example HTML file for browser usage - Update package.json with browser field and new scripts
1 parent 534275d commit ab6c20b

17 files changed

+1599
-25
lines changed

dist/browser.d.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { NostrWSClient } from './core/client';
2+
import type { NostrWSMessage, ConnectionState } from './types/index';
3+
import type { NostrWSClientOptions } from './types/websocket';
4+
export { NostrWSClient };
5+
export type { NostrWSMessage, NostrWSClientOptions, ConnectionState };
6+
declare const _default: {
7+
NostrWSClient: typeof NostrWSClient;
8+
};
9+
export default _default;
10+
//# sourceMappingURL=browser.d.ts.map

dist/browser.d.ts.map

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

dist/browser.js

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

dist/browser.js.map

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

dist/browser/nostr-websocket-utils.min.js

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

dist/browser/nostr-websocket-utils.min.js.map

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

dist/browser/report.html

Lines changed: 39 additions & 0 deletions
Large diffs are not rendered by default.

dist/cjs/browser.d.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { NostrWSClient } from './core/client';
2+
import type { NostrWSMessage, ConnectionState } from './types/index';
3+
import type { NostrWSClientOptions } from './types/websocket';
4+
export { NostrWSClient };
5+
export type { NostrWSMessage, NostrWSClientOptions, ConnectionState };
6+
declare const _default: {
7+
NostrWSClient: typeof NostrWSClient;
8+
};
9+
export default _default;
10+
//# sourceMappingURL=browser.d.ts.map

dist/cjs/browser.d.ts.map

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

dist/cjs/browser.js

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

0 commit comments

Comments
 (0)