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

Browser-based build #36

Open
strogonoff opened this issue Jan 27, 2025 · 0 comments
Open

Browser-based build #36

strogonoff opened this issue Jan 27, 2025 · 0 comments

Comments

@strogonoff
Copy link
Contributor

strogonoff commented Jan 27, 2025

The goal is to replicate anafero-cli package functionality in the browser.

Full browser-based wrapper

Currently, the CLI accepts a repository root in the filesystem. It does the following: 1) resolve configuration, 2) fetch, compile & instantiate adapters, 3) invoke anafero’s process() function, providing it requisite utilities to access object data from repository in local filesystem (current dir) and to write resulting artefacts to local filesystem.

We can do the same in the browser (mostly in worker). The difference is that the user would specify a source repository URL & credentials, instead of filesystem we’d use whatever fastest in-browser storage (possibly DuckDB or SQLite, or maybe we can try LightningFS or similar), and adapters would be instantiated using async blob import()s.

Minimal browser-based wrapper

After #37, build system would optionally accept a source and adapter configuration without a Git repository. A simple browser wrapper would not care about working with Git, but instead would accept a dragged file or directory. Configuration can be provided by the user through a simple GUI (since it cannot be resolved). The browser-based wrapper would still need to handle fetching, compiling and instantiating adapters (likely using async blob imports).

After build

After build, we can initiate a download from the browser, or even create an iframe and allow to browse the site.

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

No branches or pull requests

1 participant