https://github.com/ompmega/oc-mix-helper-plugin
OctoberCMS plugin that supports Laravel Mix "mix()" function in Twig templates.
https://github.com/ompmega/oc-mix-helper-plugin
Last synced: 12 months ago
JSON representation
OctoberCMS plugin that supports Laravel Mix "mix()" function in Twig templates.
- Host: GitHub
- URL: https://github.com/ompmega/oc-mix-helper-plugin
- Owner: ompmega
- Created: 2019-02-01T02:31:16.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-10-26T20:14:51.000Z (over 4 years ago)
- Last Synced: 2023-04-25T21:38:43.066Z (about 3 years ago)
- Language: PHP
- Homepage: https://octobercms.com/plugin/ompmega-mixhelper
- Size: 7.81 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mix Helper Plugin
Helper plugin for OctoberCMS themes using Laravel Mix. Adds custom `mix()` twig function for the generated `mix-manifest.json` file.
## Setup
- Install plugin or search for `Ompmega.MixHelper`
- Enable plugin (if not automatically enabled already)
- Run `yarn dev` for development or `yarn prod` for production
- Set a custom base URL in `config/app.php`: `'mix_url' => env(MIX_ASSET_URL, null),` (optional)
## Theme structure
Below is the directory structure that the plugin uses to locate the `mix-manifest.json` file and the provided `webpack.mix.js` example uses two new directories inside of assets.
```bash
my-theme/
├── assets/
│ ├── public/ == Public folder for generated assets
│ ├── resources/ == Resources folder for development
│ └── mix-manifest.json == Manifest in assets directory
├── content/
├── layouts/
├── pages/
├── partials/
└── webpack.mix.js == Webpack in theme directory
```
## Documentation
- Laravel Mix (https://laravel-mix.com)
## Issues
Please report any questions or issues [here](https://github.com/ompmega/oc-mix-helper-plugin/issues).
## License
MIT