Simple Wordpress starter theme with Webpack and ES5, ES6 and ES7 JS support (transpiled by Babel and polyfilled in IE via polyfill.io CDN)
This project requires Node.js v8.x.x to be installed on your machine. Please be aware that you might encounter problems with the installation if you are using the most current Node version (bleeding edge) with all the latest features.
$ cd my-wordpress-folder/wp-content/themes/
$ git clone https://github.com/pearcake/monday.git
$ cd monday
$ npm install
Create livereload.json in your theme folder (added to .gitignore by default) with "url" and "port" parameters that will be used to proxy your local Wordpress server during development. Example:
{
"url": "http://localhost/wordpress",
"port": 3000
}
If you want to use custom textdomain you can change it globally on line 5 in functions.php
:
define('THEME_TEXTDOMAIN', 'yourcustomtextdomain');
and use it like this:
<?php _e('Text that needs translation', THEME_TEXTDOMAIN); ?>
$ npm run watch
When building for production, the CSS and JS will be minified. To compile and minify the assets in your /assets/dist
folder, run
$ npm run build