Picture of Anders Ekman
Livereload
by Anders Ekman - Monday, 3 October 2016, 7:06 AM
 

Anyone got livereload to work with grunt server?

Cheers,
Anders

Aniket Dharia
Re: Livereload
by Aniket Dharia - Monday, 3 October 2016, 8:22 AM
 

Hi Anders - 

Are asking for Live reload of the script based on changes? 

For Framework or AT?

Thanks!

Regards,

Aniket

Picture of Anders Ekman
Re: Livereload
by Anders Ekman - Monday, 3 October 2016, 8:55 AM
 

Yes, based on changes.
For the framework, I would like a better setup for developing a theme.

Thanks!

Picture of Anders Ekman
Re: Livereload
by Anders Ekman - Tuesday, 1 November 2016, 12:53 PM
 

Anyone know how to make this work?

Picture of Oliver Foster
Re: Livereload
by Oliver Foster - Tuesday, 1 November 2016, 7:14 PM
 

It hasn't been written yet, but it is in the pipeline.

Picture of Oliver Foster
Re: Livereload
by Oliver Foster - Tuesday, 1 November 2016, 7:24 PM
 

https://github.com/cgkineo/adapt-buildkit-rub/blob/master/README.md

 

If you use rub instead of grunt to build your framework, it has live reload as standard on the server command. ^ directions are on the readme. It's not officially supported by the adapt learning community though.

Picture of Sam Tsiu
Re: Livereload
by Sam Tsiu - Thursday, 9 March 2017, 4:25 AM
 

You should definitely try rub. It's a great tool  to work directly with the framework.

If you insist on working with grunt, here's a simple solution.

1. install browser-sync globally with npm install -g browser-sync

2. develop and watch your course with grunt dev 

3. in another terminal window, instead of  grunt server , run browser-sync start -s build -f build

-s build (serve files from the build directory)

-f build (watch build directory for changes to fire reload, you can narrow down this to build/course if you only work with course, not plugins)

There are a lot other options you can explore, run browser-sync help start to find out.

Cheers

Sam

 

 

Picture of Scott L
Re: Livereload
by Scott L - Saturday, 22 April 2017, 1:54 AM
 

Sam, your browser-sync workflow is just what I was wondering about. Thanks so much for posting this!

I added an npm script to the bottom of package.json for a (not much) shorter run command:

,
"scripts": {
  "bserver": "browser-sync start -s build -f build"
}

To run: $ npm run bserver

Picture of Sam Tsiu
Re: Livereload
by Sam Tsiu - Saturday, 22 April 2017, 3:28 AM
 

That's even better! Thanks, Scott!

As mentioned above, I use rub in my workflow. It's a great tool!