0.0.2 • Published 5 years ago
mill3-wp-boilerplate v0.0.2
MILL3 Wordpress Theme Boilerplate
Our WP theme boilerplate using Timber/Twig templates
Requirements
- npm / yarn
- Timber WP plugin
How to use for local development
Edit wp-config.php and add this constant :
define('THEME_DEV', true);Make sure the name line in package.json matches your theme's directory name.
{
"name": "mill3-wp-boilerplate",
"version": "2.0.0"
.../wp-content/themes/mill3-wp-boilerplate/Install all node requirements :
npm installRun the install script to find and replace the theme domain name and namespace
node install.js --domain="mytheme" --namespace="MyTheme"Then start Webpack
npm run devProduction assets build
Simply run :
npm run buildThen Git add everything in dist/* directory.
In production mode, assets are loaded from dist/assets.json file, cache busting included !
Prettier/ESLint
You can ESLint your code with the following command :
npm run lintAnd Prettier formatting :
npm run prettierPlease also note that there's a pre-commit hook using pretty-quick which can be disabled in package.json.
0.0.2
5 years ago