HumHub provides some grunt tasks to ease the execution of some console commands. This guide describes how to setup grunt and run these commands. All grunt tasks need to be run within your HumHub root.
npm installin your HumHub root
Build production assets
When running a development environment, you'll have to manually build those
production assets in order to run acceptance tests (or testing the production mode). The production build will compress
scripts and stylesheets configured in
humhub\assets\AppAsset into the following files:
Grunt based build
The simples way to build your production assets is by running the following grunt task:
- Delete the content of your
- Delete the old compressed file
- Run the following command within your
Refer to the Yii Asset Guide for more information.
HumHub themes consist of many less files within the
/less directory of a theme. The
grunt build-theme task can be used
to build the community theme or other themes residing in the
@humhub/themes directory. For this command you'll need to
Build community theme
To rebuild the community theme run:
Build custom themes
To build another theme residing in the
@humhub/themes directory run:
Refer to the Theming Guide for more information about custom themes.
Manual theme build
To build a theme without grunt, run the following command:
Search index rebuild
Grunt task for rebuilding your Search Index
Grunt task for running database migrations.
The following command will run the migration for core and modules:
Run core migrations only:
Run test server:
See Testing Guide for more use cases of the
grunt test task.