Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mishterk/wp-laravel-mix-theme-boilerplate
A minimalist boilerplate for WordPress theme development using Laravel Mix
https://github.com/mishterk/wp-laravel-mix-theme-boilerplate
laravelmix wordpress wordpress-boilerplate wordpress-development wordpress-theme
Last synced: 2 months ago
JSON representation
A minimalist boilerplate for WordPress theme development using Laravel Mix
- Host: GitHub
- URL: https://github.com/mishterk/wp-laravel-mix-theme-boilerplate
- Owner: mishterk
- Created: 2019-03-09T00:18:53.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T00:50:34.000Z (almost 2 years ago)
- Last Synced: 2024-10-03T12:31:05.116Z (3 months ago)
- Topics: laravelmix, wordpress, wordpress-boilerplate, wordpress-development, wordpress-theme
- Language: PHP
- Size: 1.13 MB
- Stars: 47
- Watchers: 7
- Forks: 10
- Open Issues: 20
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
A minimalist boilerplate for WordPress theme development using [Laravel Mix](https://laravel.com/docs/5.8/mix).
## Getting started:
1. Clone into an empty theme directory
1. `cd` into your new theme directory
1. Run `npm install`
1. Copy the `local-example.json` file to `local.json` and replace the `proxy` value with your local development hostname
- This will allow you to use live reload/injection while working on your CSS/JS
### To Start DevelopmentRun `npm run dev`
Assets will be compiled and BrowserSync will proxy the dev host allowing you to work while seeing your CSS and JS
changes appear on the site as they are recompiled.### To Prepare Assets for Deployment
Run `npm run prod`
This will prepare versioned assets and sourcemaps for your CSS and JS files.
## Versioned Assets
Versioned assets will appear in a `build` directory alongside a manifest file which is used while
[enqueuing scripts and styles](https://github.com/mishterk/wp-laravel-mix-theme-boilerplate/blob/master/includes/scripts-and-styles.php).
This saves you the need to adjust version parameters on your assets and makes it possible to remove parameters on
asset URLs without losing the ability to force those assets to update in browsers.