octobercms-webpack-starter-.../README.md

34 lines
841 B
Markdown
Raw Permalink Normal View History

2021-03-27 18:31:23 +00:00
# October CMS Webpack Theme Boilerplate
2021-03-27 17:41:49 +00:00
This is a starter theme for October CMS that includes:
2021-03-26 12:33:37 +00:00
2021-03-27 18:40:36 +00:00
- Webpack (using [Laravel Mix](https://laravel.com/docs/8.x/mix))
2021-03-27 17:41:49 +00:00
- PostCSS
2021-03-27 18:23:39 +00:00
- Hot module reloading
2021-03-26 12:33:37 +00:00
To use it:
2021-03-27 18:31:23 +00:00
- [Install October CMS](https://octobercms.com/docs/setup/installation).
- Clone the repo in October's `themes` directory.
- Inside cloned directory run `npm install`.
- Install more packages using `npm install --save`.
- Require your installed packages in `src/js/app.js`.
- Run `npm run dev` (`npm run watch` to recompile when something changes, `npm run hot` to enable HMR).
- Run `npm run prod` to compile for production.
2021-03-26 12:33:37 +00:00
2021-03-27 18:31:23 +00:00
## To enable the Ajax framework
2021-03-26 12:33:37 +00:00
```sh
npm install jquery
```
Add framework tag to `layouts/default.htm`:
```
<script src="{{ this.layout.scripts }}"></script>
{% framework extras %}
{% scripts %}
```