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

JavaScript library for DocumentCloud API #162

Open
eyeseast opened this issue Aug 8, 2023 · 4 comments
Open

JavaScript library for DocumentCloud API #162

eyeseast opened this issue Aug 8, 2023 · 4 comments
Assignees
Labels
dependencies Pull requests that update a dependency file help wanted Extra attention is needed

Comments

@eyeseast
Copy link
Contributor

eyeseast commented Aug 8, 2023

Let's build a standalone javascript client for the DocumentCloud API. We can start by extracting some of the code uses in the new Add-Ons UI, since it's built on native fetch. Ideally, this library should work in all javascript environments: the browser, NodeJS and Deno.

@eyeseast eyeseast self-assigned this Aug 8, 2023
@eyeseast eyeseast added help wanted Extra attention is needed dependencies Pull requests that update a dependency file labels Aug 14, 2023
@duckduckgrayduck duckduckgrayduck transferred this issue from MuckRock/documentcloud-frontend Aug 18, 2023
@eyeseast
Copy link
Contributor Author

We probably want to write this in TypeScript and include types that the DocumentCloud frontend can use.

@eyeseast
Copy link
Contributor Author

Once this has its own repo, probably want to make a dedicated project board for it, too.

@eyeseast
Copy link
Contributor Author

eyeseast commented Sep 7, 2023

Looking at Svelte's approach, this seems eminently reasonable: https://news.ycombinator.com/item?id=35892250

It looks like all the files are JS, so imports work as normal and everything works without a build step, while types get defined in separate definition files like this one: https://github.com/sveltejs/svelte/blob/master/packages/svelte/src/compiler/interfaces.d.ts

@eyeseast
Copy link
Contributor Author

eyeseast commented Sep 7, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant