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

Organize build, allow one entrypoint per file #305

Merged
merged 2 commits into from
Oct 1, 2023

Conversation

franzaps
Copy link
Contributor

Adds one entrypoint per file such that import { generatePrivateKey } from 'nostr-tools/keys'; can be done from clients without having to import everything but the kitchen sink. For ESM and CJS, the IIFE version still bundles from index.ts

@franzaps franzaps mentioned this pull request Sep 26, 2023
@paulmillr
Copy link
Contributor

lgtm

@fiatjaf
Copy link
Collaborator

fiatjaf commented Oct 1, 2023

I don't know how to fix this conflict because I don't understand the meaning of these package.json fields.

@franzaps
Copy link
Contributor Author

franzaps commented Oct 1, 2023

@fiatjaf I changed it to lib/types (instead of lib) just to have it a bit more organized

Not sure about resolveJsonModule

Allows importing modules with a .json extension, which is a common practice in node projects. This includes generating a type for the import based on the static JSON shape.

Maybe keep it and check that the whole thing still works

@fiatjaf fiatjaf merged commit ce11a5f into nbd-wtf:master Oct 1, 2023
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants