Musket pre-configures and automates an awful lot of the parts and processes that are used to develop a modern website. It’s designed in such a way that you can use it without knowing what is going on behind the scenes. But where is the fun in that?
Below is a guide to the parts of Musket that you have to understand to be able to use it and the parts that you only need to know about if they interest you.
It goes without saying you need to be familiar with WordPress to be able to use Musket.
Musket is centred around a child theme of the Genesis framework. Why? Because it’s the best theming framework for WordPress bar none.
It’s exuberant use of hooks throughout its codebase encourages a developer-centric workflow that is perfectly in line with the Musket ideology.
Genesis is a premium theme and so isn’t bundled with Musket. If you haven’t got it already, get it from here (aff. link).
You will need to be up-to-speed with the Genesis framework to get the most out of Musket. Particularly when it comes to altering the structure of the site or incorporating custom business logic for your website.
Again, you’re not going to get far with Musket if you don’t know some PHP. Musket makes many of the decisions about setting up your files for you (it’s an opinionated framework), freeing you up to concentrate on the business logic of the site (which is where you add value for your client).
You don’t need to be a PHP guru, but you at least need to understand PHP coding as it pertains to WordPress and Genesis.
A large part of the work of building a custom child theme happens in its stylesheets. With Musket, it’s all Sass based. You will need to know Sass for Musket to be of any use to you.
Musket incorporates the Bourbon mixin library and Neat grid framework. It would be useful to learn a bit about them but it’s by no means necessary for working with Musket.
The command line
You’re probably going to have to open a terminal. See the next few paragraphs to find out why.
Don’t worry, there are only a couple of commands you’ll need to copy and you don’t necessarily need to know what’s going on behind the scenes.
However, if you want to learn something new that’ll stand you in good stead for the rest of your development career, I’d recommend learning the basics of the command line. Technologies come and go but the command line underpins it all.
If you’re on Mac you have Terminal app built-in, but I’d recommend you check out iTerm 2.
If you’re on *nix you don’t need any advice from me.
If you’re on Windows you can try Cygwin. However, I’ve heard of problems with the Windows file system not being able to cope with the paths generated by NPM. If you’re serious about your dev you probably need to think about getting a *nix system. Either invest in a Mac or download Ubuntu. You could always dual boot it.
Node / NPM
All you need to know about Node is that we use it to install Gulp, Bower and their dependencies.
NPM is the Node Package Manager – kind of like the App Store for Node modules.
Once Node and NPM are installed globally on your system, you’ll only ever have to run the command
$ npm install once for each new site you create.
Of course, if you know your way around Node and NPM you can make much better use of Gulp and Bower.
If you don’t already have Node installed you can download it from here. It’ll install NPM for you too. However, if you’re on Mac OSX, you might be better off reading this article by John Papa and installing it via Homebrew.
$ gulp in your command line and it’ll happily sit there serving up your site at localhost:3000 and compiling your Sass every time you make a change. It does a whole lot more too but we’ll talk about that in the Gulp section of the docs.
If you want to zip up your theme for distribution just type
$ gulp dist.
You can completely ignore Bower and Musket will work just fine. If you know what you’re doing it’s all set up to go.
You don’t have to version control your site. But you probably should!
If you choose to use Git, there’s a
.gitignore file pre-configured in the site root. Edit to you heart’s content.