Pull request for live-reload?

40 views
Skip to first unread message

Nick Parker

unread,
Nov 27, 2012, 8:07:50 AM11/27/12
to serve...@googlegroups.com
Hello,

I forked Serve and added support for rack-livereload/guard-livereload as well as a template for haml projects, is this something that you would accept as a pull request? If not by default, then by configuration option on serve create?

Thanks!
Nick

John Long

unread,
Nov 27, 2012, 5:26:56 PM11/27/12
to serve...@googlegroups.com
Hey Nick,

Definitely interested in pull requests for each of these.

Jess Brown was working on an update for HAML. Jess do you have an update on that? Maybe you guys could work together on it. There should be a flag for selecting your template language.

--John

Jess Brown

unread,
Nov 27, 2012, 10:00:51 PM11/27/12
to serve...@googlegroups.com
Hi Guys,

I was a little confused on where we left off (https://github.com/jlong/serve/pull/59).  I could probably add the haml template with config option without too much trouble, but wasn't sure on the direction.

I'd be happy to reissue a new PR.


Jess Brown
Brown Web Design

Nick Parker

unread,
Nov 28, 2012, 10:48:25 AM11/28/12
to serve...@googlegroups.com
Sorry Jess! I totally didn't check the issues or pull requests at all, I just forked and went to work.

In my fork I added guard-livereload and rack-livereload as a default, and tested it on OS X and Linux. Not sure if you'd want that as a default or as a configuration option.

As far as the haml piece, I don't want to step on any toes - In my fork I added a template for it, updated the haml/sass/etc gems, and enabled haml by default in the Gemfile. I also had to monkeypatch Tilt as it ignores the default encoding of the ruby environment when loading a template, and instead forces it to 8-bit ASCII. Needless to say that doesn't play well with UTF-8 :-)

I'm super slammed at work but would be happy to change a few things for a pull request as required; especially with the live reload Serve is a tool that we can definitely use where I work.

Thanks,
Nick

John Long

unread,
Nov 28, 2012, 11:03:28 AM11/28/12
to serve...@googlegroups.com
Hey Nick,

Is it possible to separate these out into two separate pull requests. I will try to review in the next week or so.

--John

Jess Brown

unread,
Nov 28, 2012, 9:43:55 PM11/28/12
to serve...@googlegroups.com
Sorry Jess! I totally didn't check the issues or pull requests at all, I just forked and went to work.

No worries, I just wanted to revive the conversation to make sure we were all on the same page.
 

In my fork I added guard-livereload and rack-livereload as a default, and tested it on OS X and Linux. Not sure if you'd want that as a default or as a configuration option.

My vote would be a config option, or I had another idea.  How hard would it be to wrap it a gem and be able to add it as a plugin/gem.  I have a project I used action mailer in and have been thinking of extracting it out to a gem (e.g. serve-mail) that would just require a line in a Gemfile and a config file.  John??
 

As far as the haml piece, I don't want to step on any toes - In my fork I added a template for it, updated the haml/sass/etc gems, and enabled haml by default in the Gemfile. I also had to monkeypatch Tilt as it ignores the default encoding of the ruby environment when loading a template, and instead forces it to 8-bit ASCII. Needless to say that doesn't play well with UTF-8 :-)

That sounds about like what I did.  It's been a while though, so I'd have to dig it back out.  If you'd like to submit what you have, that'd be fine with me, or if you want to work on the livereload stuff, I could try and get the haml going??
 

Jess

John Long

unread,
Nov 29, 2012, 9:41:15 AM11/29/12
to serve...@googlegroups.com
On Nov 28, 2012, at 9:43 PM, Jess Brown <je...@brownwebdesign.com> wrote:

In my fork I added guard-livereload and rack-livereload as a default, and tested it on OS X and Linux. Not sure if you'd want that as a default or as a configuration option.

My vote would be a config option, or I had another idea.  How hard would it be to wrap it a gem and be able to add it as a plugin/gem.  I have a project I used action mailer in and have been thinking of extracting it out to a gem (e.g. serve-mail) that would just require a line in a Gemfile and a config file.  John??

I'm not sure I fully understand. Nick is your original fork available on GitHub?

As far as the haml piece, I don't want to step on any toes - In my fork I added a template for it, updated the haml/sass/etc gems, and enabled haml by default in the Gemfile. I also had to monkeypatch Tilt as it ignores the default encoding of the ruby environment when loading a template, and instead forces it to 8-bit ASCII. Needless to say that doesn't play well with UTF-8 :-)

Is this related to the UTF-8 thing?

--John

Johnathon Wright

unread,
Apr 6, 2016, 11:40:04 AM4/6/16
to Serve Users
Nick: I can't seem to find this PR... was it ever merged? Would like to be able to do live reload without having to do any work, because I'm lazy. I'll go check out the gems you mentioned.

Johnathon Wright

unread,
Apr 6, 2016, 11:41:53 AM4/6/16
to Serve Users
Actually, never mind. I was looking for a different feature ... being able to restart the server after deploy without killing it. Please ignore.
Reply all
Reply to author
Forward
0 new messages