DOCUMENTATION IN PROGRESS
A gulp boiler plate for a wordpress theme
- Requires node.js and gulp
- Requires local WordPress environment (works best with https://github.com/geekster909/asap-wp)
Clone into Themes directory
git clone http://github.com/geekster909/asap_s-new.git <project-name>
- remove
.git
directory in new theme directory (delete or run commandsudo rm -rf .git
)
Navigate to theme directory and install Node Packages
npm install
-
5-step find and replace on the name in all the templates
- Search for:
'asap_s'
and replace with:'<project-name>'
(inside single quotations) to capture the text domain. - Search for:
asap_s_
and replace with:<project-name>_
to capture all the function names. - Search for:
Text Domain: asap_s
and replace with:Text Domain: <project-name>
in style.css. - Search for:
asap_s
and replace with: - Search for:
asap_s-
and replace with:<project-name>-
to capture prefixed handles.
- Search for:
-
Update BrowserSync proxy
proxy: 'local.<project-name>.com'
gulp
command for developing
gulp compile
command for compiling (scss, js, images)
- assets/styles/scss/*.scss => dist/styles/styles.css
- assets/styles/vendor/*.css => dist/styles/vendor.css
- assets/scripts/.js => dist/scripts/.min.js
- assets/scripts/vendor/*.js => dist/scripts/vendor.min.js
- assets/images/* => dist/images/*
all images in /assets/images/ - will get minified
set local url
scss changes
js changes
image changes