Theme development is supported by a php package that has artisan commands that eases theme development. There are also two existing themes to take a look at, both licensed under MIT license. Fork them and explore them to understand how LaraOne compatible theme is built.
Requirements for Development
To develop themes for LaraOne, following software is required to be installed on your local machine:
- theme development environment
Theme development environment
While theme is being developed Laravel-Zero is used to provide environment in which to develop the theme. Laravel-Zero is a micro-framework for console applications. It is only used during theme development, once theme has been packaged and installed, its managed by LaraOne CMS.
Package and Themes
The best way to get started building a theme is to study Ikigai and Aurora themes mentioned above. Aurora is smaller theme and would be a good theme to study.
To compile a theme and generate assets, first you need to install all node modules and packages specified in package.json
When all packages have been installed, you are able to build theme assets.
Run following command to build theme assets for dev environment:
npm run dev
Run following command to build theme assets for production environment:
npm run prod
To package theme assets and views for distribution run:
php run theme:pack
This command will create a zip file in build folder. This file will be ready for distribution and can be directly installed by LaraOne CMS.