mill3-wp-boilerplate

0.0.2 • Public • Published

MILL3 Wordpress Theme Boilerplate

Our WP theme boilerplate using Timber/Twig templates

Requirements

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 install

Run 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 dev

Production assets build

Simply run :

npm run build

Then 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 lint

And Prettier formatting :

npm run prettier

Please also note that there's a pre-commit hook using pretty-quick which can be disabled in package.json.

/mill3-wp-boilerplate/

    Package Sidebar

    Install

    npm i mill3-wp-boilerplate

    Weekly Downloads

    2

    Version

    0.0.2

    License

    MIT

    Unpacked Size

    1.21 MB

    Total Files

    293

    Last publish

    Collaborators

    • thetoine