Halt is a WordPress starter theme that utilizes either Timber + Twig or a vanilla WordPress setup
Prerequisite | How to check | How to install |
---|---|---|
PHP >= 5.6.4 | php -v |
php.net |
Node.js >= 7.8.x | node -v |
nodejs.org |
Composer >= 1.4.2 | ||
Laravel Mix >= 1.0 |
- Clone this repo to you machine
- Run
composer install
to install Timber + Twig and create the autoloader file - Run
yarn install
ornpm install
to install the theme dependencies - Run
npm run dev
to compile the initial theme assets - Run
wp theme activate {theme_folder_name}
- Visit your WordPress install in your browser and you will be gretted with the Halt welcome screen
- Get to work!
Halt's main configuration is setup in two classes: HaltBaseTheme and HaltTheme found in /lib/halt-base-theme.php
and /lib/halt-init-theme.php
respectively.
The HaltBaseTheme
class contains common functionality useful for all themes built with Halt. All additional configuration should be done in the HaltTheme
class.
N.B. If more PHP files are added to the /lib
folder, be sure to require them in functions.php
Halt uses Laravel Mix as its build system. It is an elegeant API for interacting with Webpack.
-
npm run dev
- Runs all tasks
- Alias for
npm run development
-
npm run prod
- Runs all tasks and minifys JS and CSS
- Alias for
npm run production
-
npm watch
- Run development build, watches SCSS and JS files for changes and runs all tasks on change, also launches BrowserSync
To use BrowserSync during npm watch
you need to update the browserSyncProxy
variable in your webpack.mix.js
to reflect your local development hostname.