punch icon indicating copy to clipboard operation
punch copied to clipboard

Turn punch into a Yo generator

Open hpoom opened this issue 12 years ago • 24 comments

I wondered if I can work with you to turn punch into a Yeoman generator? I have recently moved away from punch and moved to Go-Static because this has yeoman support.

Only issue is Go-Static used HAML which is not very JS in my view. I prefer handlebars. There appears to be many similar JS static site generators out there but Punch still appears to have the edge. Maybe if we Yeoman'd punch up and had options for blog on/off etc then we could start to factor in some of the other good parts of other JS static site builders.

We need to move away from lots of static site builders with few people on each, to fewer with larger communities on each. Sorry for the long post/rant. I would love to help you get Punch into a Yo Generator.

hpoom avatar Oct 27 '13 19:10 hpoom

hi @hpoom, just curious, what would be the advantage of having punch as a yeoman generator compared to what Punch CLI is doing now?

constantx avatar Oct 27 '13 22:10 constantx

In my opinion there would be many advantages. Firstly having it in yeoman would me it would be packaged with bower and have grunt tasks setup by default. There for pushing the site to S3, or GitHub pages could use the code already available to do this. Users of punch could then add in additional grunt tasks if they want to.

It would save you reimplementing Saas or Less compiling and would mean the users of punch could customise things how they want them. Also the server code could be changed to be 'grunt server' which would be more in line with many other tools.

The biggest advantage would be that when you do 'yo punch' you could have lots of options. Do you want a blog yes/no. Do you want bootstrap 3, or foundations? And many more options. All of these could be built into the yo generator. Also when you want a new page or blog post you could do 'yo punch:post' or 'yo punch:page'.

For me it would align it to many of the other tools I use. I always do 'yo backbone' to start a new backbone project now.

I don't mind assisting if this is a route you want to go down. So far it appears to you have had to implement things like 'punch g', 'punch p' and 'punch s' all which could be handled by Grunt and be more accessible to users that already know grunt. In my opinion grunt and bower are becoming standard tools for the web, so would be nice if punch used them.

hpoom avatar Oct 28 '13 10:10 hpoom

Also to add, with punch's CLI at the moment I need to remember punch's commands and it is perimeters which are all custom to punch. If punch used yeoman the commands would be standardised and would be the same as I use to any backbone site or webapp.

hpoom avatar Oct 28 '13 10:10 hpoom

Figuring out Grunt and Bower with Punch is on my to do list, where it's been for ages and is likely to remain for a while yet. So this sounds interesting. So out of touch at the moment I hadn't even heard of Yeoman :(

Can you think of any Punch feature that would be lost? What about the preview functionality – currently I believe Punch only updates the content that's changed when previewing a page, is grunt server that smart?

adrinux avatar Oct 28 '13 11:10 adrinux

Grunt can be that smart if configured correctly.

hpoom avatar Oct 28 '13 13:10 hpoom

Hey @hpoom, I like the idea of aligning Punch with rest of eco-system (actually, Yeoman/Bower wasn't released when I originally wrote Punch).

As you said using yo punch would be a good way generate a site with customised options. We do have boilerplates, but with a proper generator mixing different components would be easy.

I'm not sure if we can directly use grunt for server and asset bundling, as the flow we use (to enable previewing) is slightly different from grunt.

What is important to keep in mind is Punch is more of a content management tool than a pure static site generator and asset bundler. Any changes we wish to bring forth must not hinder those capabilities.

laktek avatar Oct 29 '13 02:10 laktek

Maybe it's better all of us organise a meeting (hangout) to discuss the plans and see where we want to take Punch? (I've prototyping and brainstorming certain ideas for v2.0), but I want to make sure we build what we want to use)

laktek avatar Oct 29 '13 02:10 laktek

@laktek A hangout sounds great. I have read on your site about moving Punch towards more of a CM tool. I like the sound of that and would love to help where ever I can.

hpoom avatar Nov 03 '13 21:11 hpoom

When is a good date/time for all of you? cc: @hpoom @adrinux @constantx

I'm in GMT+8

laktek avatar Nov 04 '13 05:11 laktek

I am GMT. I can do weekday evenings or weekends.

hpoom avatar Nov 04 '13 12:11 hpoom

Since @adrinux has setup a IRC channel, will carry out the discussion through it.

I wrote down a brief meeting procedure. Feel free to raise your concerns and suggestions.

Anyway, I think we should have this meeting soon and to the exciting part - hacking.

How about 11th November? We'll have to pick a time slot that all of us will be available (won't be easy though).

laktek avatar Nov 05 '13 02:11 laktek

sounds good, would love to join.

constantx avatar Nov 05 '13 02:11 constantx

I'm in GMT. circa 5-9pm each day is more difficult to manage because: children. Ditto, sometimes, weekends. I'll probably not have anything much to contribute on this, so don't worry too much about me.

11th sounds fine…but looking at some of these timezone meeting planners (http://www.worldtimebuddy.com) it looks tricky. GMT lunch/afternoon coincides with GMT+8 evening so weekends might work better for @hpoom?

adrinux avatar Nov 05 '13 12:11 adrinux

I can do lunch time GMT on the 11th if that works well for others.

hpoom avatar Nov 05 '13 15:11 hpoom

So then 12:00 GMT on 11th November? Head over to #punch room in freenode.

laktek avatar Nov 06 '13 11:11 laktek

12:00 GMT on 11th November - Added to the calendar :)

adrinux avatar Nov 06 '13 16:11 adrinux

Sorry to be a pain, can we make it 12:30 GMT. I am not sure I will be available at 12:00.

hpoom avatar Nov 06 '13 23:11 hpoom

I'm flexible, send me a gcal invite please :) constantx at gmail

constantx avatar Nov 07 '13 01:11 constantx

Just a reminder on today's meeting at 1230 GMT.

laktek avatar Nov 11 '13 05:11 laktek

Ah, a bit too early for me :(

constantx avatar Nov 11 '13 08:11 constantx

gist of the irc discussion: https://gist.github.com/adrinux/7413299#file-punch-103-yo

Summary: Work on Grunt integration initially, look at yeoman again later.

adrinux avatar Nov 11 '13 13:11 adrinux

yay, I love grunt :)

constantx avatar Nov 11 '13 21:11 constantx

Sorry I have not updated here. I have not yet started on Grunt integration as been stacked in my day job. It is still very much on my todo list and hope to show some progress soon.

hpoom avatar Dec 03 '13 14:12 hpoom

@hpoom any progress with Grunt?

erquhart avatar Feb 26 '14 05:02 erquhart