This is a template that can be used for the development of new BIIGLE modules.
The BIIGLE manual contains some tutorials that can get you started with BIIGLE module development. This repository implements the code that is covered in the first three tutorials.
First, create a new repository (either private or public) based on this template.
Clone the module to a local directory. The name of this module needs to be updated in several locations. For your convenience, we provide a PHP script to automate this process.
Run php setup.php YourModuleName to update all locations at once. The name must start with an uppercase letter and may only contain letters and digits (e.g. MyModule).
If your module is not (yet) published on Packagist, you need to add the following to biigle's composer.json (found in the BIIGLE root directory; if repositories already exist, add the new one to the list):
"repositories": [
{
"type": "vcs",
"url": "git@github.com:<github_username>/<your_module_name>"
}
]
If the repository is private you need to have ssh-keys configured for your GitHub account. Run composer require biigle/<yourmodulename>:dev-main --ignore-platform-reqs in the BIIGLE root directory to install the module to BIIGLE. Note that Composer identifies the package by the name in its composer.json (which setup.php sets to biigle/<yourmodulename> in lowercase), not by the repository URL. Still in the BIIGLE root directory run php artisan vendor:publish --tag=public.
The module is now installed to biigle/vendor/biigle/<yourmodulename>. You can go there and develop your module. Run npm install once to set up the build system. Then you can use the following commands:
npm run dev: Continuously builds the assets during development.npm run build: Builds, minifies and publishes the assets once.npm run lint: Run static analysis to check for errors.
Also update this readme for your new module. You should remove the first three subsections and update the installation instructions. And don't forget to change the author and GitHub address in composer.json as well.
Note that you have to replace biigle/module with the actual name of your module/repository.
- Run
composer require biigle/module. This requires your module to be published on Packagist. If you don't want to publish your package, read more on alternative options. - Run
php artisan vendor:publish --tag=publicto refresh the public assets of the modules. Do this for every update of this module.
Take a look at the development guide of the core repository to get started with the development setup.
Want to develop a new module? Head over to the biigle/module template repository.
Contributions to BIIGLE are always welcome. Check out the contribution guide to get started.