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

[incomplete] Browser support #105

Closed

Conversation

AdrianRossouw
Copy link
Contributor

I took a stab at getting seneca to run in the browser, by using browserify to generate a standalone package in UMD format that can be used either directly in the browser, or by require.js or browserify itself. It is automatically generated on publishing to npm, and running npm install. You can then just add a script for the seneca.browser.js file.

The process I followed was to use zuul to run the mocha tests in the browser environment, and make the changes to get as many of them running. You can run npm run-script test-browser, and go to http://localhost:8080/__zuul to run them yourself.

More information is available in each of the commits, but the big roadblock in all of this is that use-plugin is really incompatible with the browser. Most of the functionality of seneca drives through that module, so anything that does seneca.act or seneca.use is broken until it's rewritten.

@juliangruber
Copy link

can you share your motivation for running seneca in the browser?

@rjrodger
Copy link
Collaborator

rjrodger commented Mar 4, 2015

@juliangruber just an experiment to see if it is possible :)

@jakepruitt
Copy link
Contributor

daydreaming would it be possible to use seneca with web-workers? The web workers API is in strings, and seneca communicates through JSON... maybe even hook in to local storage for data entities? I'm not sure it needs to be within this project, but I like the abstractions seneca provides, and would like something nicer than web workers. Maybe we can just make that seneca-the-younger ;)

@AdrianRossouw
Copy link
Contributor Author

closing as won't fix.

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.

4 participants