jbake-org / jbake-maven-plugin

JBake Maven Plugin - NOTE: Code now resides in main JBake repository - https://github.com/jbake-org/jbake
9 stars 15 forks source link

Add livereload for inline goal #2

Closed ybonnel closed 7 years ago

aldrinleal commented 10 years ago

Can you make a high-level description of your changes? (Sorry, haven't tracked the lists for a while)

ybonnel commented 10 years ago

Do you know livereload?

It's a protocol to allow trigger refresh on browser when some files change.

So in the PR i added livereload-jvm and triggered it on inline goal.

You can now run :

mvn jbake:inline

Open localhost:8080 on your browser. Active your livereload plugin on your browser.

When you change any files, the maven plugin will trigger a bake, and livereload will refresh your browser. Cool, isn't it? :)

I will also add comments on commit side to explain the code.

Sorry for my bad English :)

aldrinleal commented 10 years ago

doesnt jbake:watch achieve the same goal?

ybonnel commented 10 years ago

no.

jbake:watch -> run a bake when a file in source change. actual jbake:inline -> same as watch and run an embeded server. my jbake:inline -> same as watch, run an embeded server and run a livereload server (refresh browser when a change in output is detected.