WordPress Starter Theme
Whenever I start developing a new project, it really takes me quite a lot of time to set up neccessary tools. In this repo, I would like to share the great tools which I have been using to build the WordPress themes. Plus, they were also standardized so that I totally develop the WordPress themes with high quality.
List of tools
- Bower for front-end package management
- gulp.js for running automation JavaScript tasks
- Travis CI for automatically testing PHP codes, using PHP_CodeSniffer and WordPress-Coding-Standard
- Gitignore for determine which files and directories to ignore, before you make a commit
- Editor Config for configuring the editor according to the same standard
Globally Setup
Your Computer must setup those tools before start develop this theme:
- Node.js
- Git CMD (For Windows, you must install Git Bash)
- Gulp-CLI: Open CMD (on Windows) or Termnial (Mac and Linux) type
npm install -g gulp-cli
- Sublime Text
- Sublime Package Control
- Editor Config Sublime (You can install via Sublime Package Control)
Project Setup
From the command line, navigate to the theme directory
- Navigate to
<theme-folder>/tools/
- Run
yarn install
to install Node modules - Run
bower install
to install front-end packages - Config your project on
tools/package.json
- Run
gulp generate
to generate your WordPress theme
Available Grunt Commands
When completed, you'll be able to run the various Grunt commands provided from the command line:
gulp generate
— Generate a new themegulp watch
— Compile assets when file changes are madegulp build
— Build for production
Running Travis CI
You want Travis CI to work, firstly, you need to sign in at https://travis-ci.org/ via your Github account. Then, just enable your projects by flicking the switch, and push new commit to Github.
Editor Config
Regarding Sublime Text Editor, you can install a plugin named Editor Config Sublime into Sublime via Package Control.