How do you start a new project?

How do you start a new project with Kirby? I’m trying to improve my workflow, considering switching from CodeKit to using gulp. More git submodules. Kibry patterns(lab)…

Do you have a boilerplate for yourself?
Do you have scripts to take care of initialising gulp, having a package.json?

This all might sound quite naive. But I am at this moment where I’m leaving familiar territory – CodeKit has kept me used to a nice UI – and suddenly I am looking at all the new things and just want to know how to get back to a nice workflow.

Terminal def needs to get more familiar to me.

I switched to Gulp and never looked back. It’s really nice to not have a UI and just a gulpfile.js file which makes you feel in total control.

Before I used WinLess, Pepros and I’ve used Codekit on Mac as well. Gulp is the final solution to all compilation, SASS, JS, images, renaming files, concating files. You can even create icon fonts on the fly or SVG sprites. 1000 of plugins for it.

Except from that I don’t use that many tools.

But do you have a boilerplate for a new project or are you starting each time at 0. Installing gulp, creating the gulpfile. setting up folder structure…?

I start from scratch, except for one thing. Keep your gulpfile.js around. When setup you don’t need to change it much if you are building stuff quite the same.

I’m trying out Patterns, the new Kirby plugin. It can change the workflow quite a bit, hopefully for the better. Try it or look at the video.

I created by own fork of Plainkit because I was losing a lot of hours into project setup. You’re free to use it however you like!

Typically, I do:

$ git clone --recursive new-project
$ cd new-project
$ git remote remove origin
$ git remote add origin
$ git push origin master

Make sure you destroy/ignore the content folder, unless you want to continue tracking that.

Only downside I can think of is that it contains the history of the kit, up to the point it was cloned. Otherwise, this has been the basis for a half-dozen or more Kirby + Gulp + Sass + Browserify projects, and I’ve been satisfied with the time saved.

I encourage you to roll your own Plainkit, because the block of commands above will work, regardless of how you choose to structure your front-end. This one is “very opinionated” in the way it’s set up, and there are undocumented bits of how I like structure my projects.


Edit: I should note… not sure how out-of-date the submodules are, so beware!