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

Add hz command to generate custom horizon client builds #509

Closed
3 tasks
deontologician opened this issue May 25, 2016 · 1 comment
Closed
3 tasks

Add hz command to generate custom horizon client builds #509

deontologician opened this issue May 25, 2016 · 1 comment

Comments

@deontologician
Copy link
Contributor

deontologician commented May 25, 2016

This would build with a couple different config options:

  • Set the horizon server explicitly
    • Sometimes (probably usually in production servers) the static domain and hz domain are different. This would bake the horizon server's location into the client itself.
  • Include or exclude Observable methods
    • Right now we export a barebones observable. It would be convenient to let the user patch methods onto the observable
  • minimize or not

For maximum configurability, the user should use webpack themselves, but this might make some simple use cases easier. The idea would be to wrap the pre-built source code that we plop into dist/ in the npm package with a simple wrapper that injects the config options.

Quick sketch of what I mean:

var fileContents = `(function() { var hzConfig = { /* some properties here the module will look for */ };` +
readFileSync(require('@horizon/client/dist/minimized').filename) +
`})()`

Note: this is explicitly with the goal of not having webpack as a dependency of the cli

@deontologician
Copy link
Contributor Author

Superceded by #638

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant