Writing codes to be lazy and rich, a homegrown Node.js workflow
As a business owner and front-end developer, I often look for opportunities to improve efficiency and profitability. One of the many ways is to reduce time spent on tedious, repetitive tasks that can be automated, which is why this internal toolkit is created.
See the toolkit in action
Visit GitHub to view and download the package for a test run.
Less click = more profit
Our WordPress-based project always go through these steps:
- Download and install WordPress from the official site
- Replace default themes and plugins with our preferred ones
- Update ‘textdomain’ in each file to a custom identifier
- Compile/compress media assets and script files into our custom-made theme
Ideally, all these actions would be chained, so one command would initiate the entire sequence. If I can do that, what normally takes five to ten minutes can be compressed into two minutes or less.
All it takes is a few keystrokes
The toolkit makes use of a variety of popular software packages (
webpack, etc.) With them, I reduced the first three tasks above to one command:
npm run setup.
The forth task is also automated using other
gulp commands so that whenever the source files change, they are compiled, compressed, and output into a specific folder for later deployment.
It’s a breeze
All in all, the toolkit makes starting a new WordPress project so much faster. As a side benefit, it is also easier for prospective developers to understand what a typical project at Grayscale would look like, and will require of them.