Professional tools and workflows for theme development Bucharest
Professional tools and workflows for theme development Bucharest, 2016 #WCBUC #1
When you boss said “We’re in a hurry. So do a quick fix for it”
More problems • Lite version • WP. org version • Child themes Bucharest, 2016 #WCBUC #4
Each version requires • CSS/JS minification ? ? • Image optimization ? ? ? • PHP/JS/CSS proper code styles ? ? • Backward and cross product compatibility ? ? • Proper textdomains ? ? • Version management ? ? ? • . . . Bucharest, 2016 #WCBUC #5
Bucharest, 2016 #WCBUC #6
Grunt task types Checking tasks • • Bucharest, 2016 File processing tasks checktextdomain phpcs jshint phplint • • • #WCBUC addtextdomain imagemin makepot phpcbf postcss wpcss #7
Gruntfile. js Bucharest, 2016 #WCBUC #8
Task files Bucharest, 2016 #WCBUC #9
Build workflows • Task definition file • Group tasks for each type of actions • Code check specific tasks Bucharest, 2016 #WCBUC # 10
Tasks specific configuration files • . jshintrc - jshint ruleset ( Word. Press standards ) • phpcs. xml - phpcs ruleset ( Word. Press standards ) • . distignore - files to be ingored on release ( grunt files, rulesets, etc … ) Bucharest, 2016 #WCBUC # 11
Generate lite version Bucharest, 2016 #WCBUC # 12
Bucharest, 2016 #WCBUC # 13
Testing multiple environments Bucharest, 2016 #WCBUC # 14
Release pipeline github master branch merge deployment server triggered via git webhook Bucharest, 2016 clone on deployment server the master branch rm redundant files (. distignore rules) grunt generate zip for release copy to demo servers #WCBUC Update changelog based on the pull request message Update version on store # 15
Conclusions • Automate all your repetitive work • Say NO to quick fixing, Spend time on testing ! • Research before developing Bucharest, 2016 #WCBUC # 16
Thank you ! Marius Cristea marius@themeisle. com Bucharest, 2016 http: //bit. ly/themeisle-themes #WCBUC # 17
- Slides: 17