A Wordpress starter theme powered by Webpack, TypeScript, and Sass.
- Clone copy the repository into your
wp-content/themes
folder - Install dependencies with
yarn install
- Develop with
yarn dev
- Build for production with
yarn build
A build
directory is created with all of the deployable files. You should upload the entire build directory and the acf json folder as the theme. The webserver should look like this:
wp-content
└── themes
└── webpack-typescript-sass-wordpress
├── acf-json
└── build
This project comes with some tooling preconfigured for PHP and NodeJS development joy.
PHPUnit - Any test files following the glob pattern *.test.php
will be run using PHPUnit.
composer run test
PHP Code Sniffer and PHP Code Beautifier and Fixer - Lint and fix your code.
composer run lint
# or
composer run lint:fix
Eslint and Styelint - Lint and fix your code
yarn run lint
# or
yarn run lint:fix
For sharing configuration between the backend and frontend, check src/theme.json
.
This common file is loaded into the backend and frontend for some easier set up of theme colors in the WP Editor and Sass variables.
Advanced Custom Fields PRO is required for this theme to work properly.
The theme comes configured with Font Awesome 5 Free.
If you have a Pro account:
- Configure npm as outlined here: Font Awesome - Using a Package Manager
- Update packages:
yarn uninstall @fortawesome/fontawesome-free yarn install @fortawesome/fontawesome-pro
- Modify
./scss/_font-awesome.scss
(uncomment pro package references / remove free package references.)