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.
- 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
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)
From the command line, navigate to the theme directory
- Navigate to
<theme-folder>/tools/ - Run
yarn installto install Node modules - Run
bower installto install front-end packages - Config your project on
tools/package.json - Run
gulp generateto generate your WordPress theme
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
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.
Regarding Sublime Text Editor, you can install a plugin named Editor Config Sublime into Sublime via Package Control.