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

Swap out Cake for Grunt #466

Closed
wants to merge 4 commits into from
Closed

Swap out Cake for Grunt #466

wants to merge 4 commits into from

Conversation

hulufei
Copy link

@hulufei hulufei commented Apr 28, 2013

Hi, I just try to swap out cake for grunt

Cake build -> grunt build
Cake watch -> grunt watch

Additionally, I add a lint task(coffeelint) for coffeescript, I do find some lint errors in the source, like mix tab indentation and spaces, maybe we can add some configurations for our code style later, I'm not sure yet.

@adambiggs
Copy link
Member

This would be really nice. Especially like the idea of adding coffeelint.

@aeischeid
Copy link
Member

Grunt has a lot of hype, but I haven't had time to explore it, so this is an honest question: other than the coffeelint piece what does this achieve or what possibilities does it open up?

@adambiggs
Copy link
Member

other than the coffeelint piece what does this achieve or what possibilities does it open up?

Nothing revolutionary, they both do the same thing in the end.

But I think Grunt is a better fit for Spine since Gruntfile is CoffeeScript. It also means we could leverage grunt's really great plugin community (I could see stuff like grunt-contrib-jasmine being useful).

Edit: Got Cake & Rake mixed up 😕... But I still think it'd be a worthwhile change.

@hulufei
Copy link
Author

hulufei commented Apr 30, 2013

Actually, it seems Grunt will not bring too much to Spine, since Spine is not a web app. I just think it's a little elegant than Cake. And there are some good points, as @adambiggs mentioned: coffeelint, run tests automatically etc.

@adambiggs
Copy link
Member

Here's a list of Grunt plugins that look like they might be useful for Spine development:

@aeischeid
Copy link
Member

@adambiggs and @cengebretson do you guys have any fresh thoughts on this? I can't say I have much of an opinion, so don't want this to get shoot down on account of me

@adambiggs
Copy link
Member

I'm bias towards grunt only because I use it every day... It's got a cleaner API and is being adopted by a lot of high-profile projects lately.

Only down side compared with cake is the extra $ npm install grunt-cli -g step needed before any of the local grunt tasks will work.

@aeischeid
Copy link
Member

I guess from the look of it it isn't like we really have to throw out the cake stuff that we have. so this wouldn't necessarily have to be a swap? I mean if we are just adding grunt for those who want it then I guess I see no problem with that

@adambiggs
Copy link
Member

You're right, but I think we should go with one or the other personally. Having two build tools with overlapping build scripts feels kind of messy IMHO...

@cengebretson
Copy link
Member

I think we should probably pick one and go with it. Spine seems like such a simple project, I think either cake or grunt will be fine. If grunt is becoming the standard for javascript projects and more people are using that might as well make the switch to that. But beyond just watch/compiling coffee script and running tests, not sure what else spine would need? Though the changelog plugin might be useful...

@adamrights
Copy link

Grunt does seem to becoming more standard. It also works nicely with bower and the yeoman generators.

@adambiggs
Copy link
Member

@aeischeid @cengebretson It's been a while since we looked at this, but I wanted to see if you'd be ok with merging it.

I'm using it locally and added a test runner server with grunt-contrib-connect to make debugging unit tests easier in the browser.

If everybody's happy with it, I can handle the merge conflicts.

@aeischeid
Copy link
Member

shoot, just in time now that gulp is the new hot thing ;)
I guess I am fine with that. the only thing I would add is that then we should update these docs on how to use it.

@adambiggs
Copy link
Member

I've been wanting an excuse to try gulp! Might give it a try first before merging this :)

@cengebretson
Copy link
Member

I think for a small project like spine either one will probably work out just fine. I will say from taking a quick look at gulp it really seems to make sense, I like the pipe/stream idea behind it.

@ghost
Copy link

ghost commented Jan 16, 2014

+1 for merging grunt. It's got a giant mindshare online, and is has many widely used plugins. Gulp may be better for some instances (I haven't used it), but it is pretty new and not well known.

However, IMO it's almost more important to have only one build system in place. Having more than one just seems ripe for weird bugs, duplicated effort, conflicting lints, etc. Especially since these are relatively easy to get running, whichever one is chosen.

@richard-flosi
Copy link
Contributor

Could gulp with browserify replace hem?

@aeischeid aeischeid modified the milestones: 1.4, 1.3 Mar 31, 2014
@reco
Copy link

reco commented May 5, 2014

+1 gulp

@jamiter
Copy link
Contributor

jamiter commented May 6, 2014

I'm also using gulp right now for a spine project (instead of Hem to be precise). Very happy with gulp. My brain just likes the simple files in -> transform/check/whatever -> files out with a lot of flexibility.

In short: +1 for gulp

@reco
Copy link

reco commented May 6, 2014

Sweet. Did you manage to make spine globally available with gulp? What hem does with the setup.coffee?

@jamiter
Copy link
Contributor

jamiter commented May 6, 2014

This is a gulpfile to replace Hem:

https://gist.github.com/jamiter/fff2081c3cdcf62ce316

It also adds live reload (which is awesome).

I did not add support for .eco/.jeco, because those do not seem to be developed anymore.

@sebastiannm
Copy link

@jamiter Hi, the "require()" is not finding modules if requiring from the index.html.
Did you had that problem too?

@jamiter
Copy link
Contributor

jamiter commented May 7, 2014

In the index page we had to add jquery first:

var jQuery  = require("jquery");
var $ = jQuery;
var exports = this;

I added an example index.jade to the gist. It's a bit off topic here so please continue any discussion about the gulpfile in the gist.

@reco
Copy link

reco commented Aug 12, 2014

hi there, in case somebody is interested we build quite a solid setup where we use gulp instead of hem

https://github.com/Nex9/imago.theme.spine

@adambiggs
Copy link
Member

Really cool stuff!

@aeischeid @cengebretson @maccman How would you feel about switching to Gulp, then incorporating something like @jamiter & @reco's examples directly into the main Spine project?

@aeischeid
Copy link
Member

was just looking into the cake file for running tests in the jasmine2 branch. I would be fine with moving to gulp over in that branch. @adambiggs does that seem like a good branch to get it in on?

@adambiggs
Copy link
Member

Sounds good to me. Seems like that branch is almost ready to merge anyway right?

@aeischeid
Copy link
Member

yes, nearly.

@aeischeid aeischeid modified the milestones: 1.5, 1.4 Apr 21, 2015
@aeischeid aeischeid removed this from the 1.5 milestone May 7, 2015
@aeischeid aeischeid added this to the 2.0 milestone Aug 18, 2016
@jamiter
Copy link
Contributor

jamiter commented Feb 17, 2017

Hey guys, could this PR be closed? It still shows up in my "mentioned PRs" list. Doesn't seem that this will ever happen after 4 years... Thanks.

@adambiggs adambiggs closed this Feb 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants