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

Use live.js and spin up a simple server for automic reloads? #8

Open
jeroenvandijk opened this issue Apr 30, 2014 · 5 comments
Open

Comments

@jeroenvandijk
Copy link

First, thanks for this plugin! I really enjoy writing midje tests and extra doc strings now I'm rewarded with a nicely looking html page.

In your video, I saw that you use the live-reload app for reloads. I think, for people not using this app already, this could be easier when the html includes a link to live.js, this would require the html to be served from http (not from file) though. I think this would be a small addition to the plugin.

What do you think?

@zcaudate
Copy link
Member

Ahh.. Very cool.

Thanks Jeroen. So you're saying that the plugin should actually spin up its own server?

On 30/04/2014, at 14:04, Jeroen van Dijk notifications@github.com wrote:

First, thanks for this plugin! I really enjoy writing midje tests and extra doc strings now I'm rewarded with a nicely looking html page.

In your video, I saw that you use the live-reload app for reloads. I think, for people not using this app already, this could be easier when the html includes a link to live.js, this would require the html to be served from http (not from file) though. I think this would be a small addition to the plugin.

What do you think?


Reply to this email directly or view it on GitHub.

@zcaudate
Copy link
Member

Though.. that means live.js would need to be permanently embedded in the page.

Would you know of a way to develop using live.js but deploy the final version without it?

On 30/04/2014, at 14:04, Jeroen van Dijk notifications@github.com wrote:

First, thanks for this plugin! I really enjoy writing midje tests and extra doc strings now I'm rewarded with a nicely looking html page.

In your video, I saw that you use the live-reload app for reloads. I think, for people not using this app already, this could be easier when the html includes a link to live.js, this would require the html to be served from http (not from file) though. I think this would be a small addition to the plugin.

What do you think?


Reply to this email directly or view it on GitHub.

@jeroenvandijk
Copy link
Author

Yeah the plugin would need to spin up its own server for ease of use. The serving of live.js is needed because it is not able to work with the file:// protocol. You can of course run something like python -m SimpleHTTPServer next to lein midje-doc, but that involves more steps.

So maybe an idea would be to have two commands: a lein midje-doc once for a final static version without live.js and lein midje-doc like how it is now, but that will also run a static file server where the html has a live.js script tag inserted.

@zcaudate
Copy link
Member

zcaudate commented May 1, 2014

I'm actually thinking that this might be quite nice as a seperate clojurescript project.

On 30/04/2014, at 15:10, Jeroen van Dijk notifications@github.com wrote:

Yeah the plugin would need to spin up its own server for ease of use. The serving of live.js is needed because it is not able to work with the file:// protocol. You can of course run something like python -m SimpleHTTPServer next to lein midje-doc, but that involves more steps.

So maybe an idea would be to have two commands: a lein midje-doc once for a final static version without live.js and lein midje-doc like how it is now, but that will also run a static file server where the html has a live.js script tag inserted.


Reply to this email directly or view it on GitHub.

@jeroenvandijk
Copy link
Author

I've tried something as you can see in the pull request. There is something wrong with the HEAD request though and therefore it doesn't reload the page yet.

What do you have in mind for a Clojurescript version?

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

2 participants