generator-farm_convention_builder
v0.1.0
Published
Generator helping scaffold FarmOS convention helpers and all associated tooling.
Maintainers
Readme
FarmOS Conventions Yeoman Scaffolder
This repo contains a yeoman scaffolder. A scaffolder is a tool that asks for some information and performs a lot of detailed and repetitive configuration, installation, documentation tasks, allowing you to dive straight into the issues that require your special talents, knowledge and creativity. In this case, the scaffolder will configure together several tools we've created which enable a user to design, publish and help other people validate their conventions (comprehensive schemata build to be interpretable, strict and intuitive).
NPM Package
- Here you can find the latest version of this generator.
Tutorials
The developer's blog (OurSci) contains tutorials on how to use this generator, plus how to write your first conventions.
Improving/Developing
All of the configuration is handled by the yeoman egnerators/app/index.js template. It will acquire data through questions, get parameters and copy files from templates as needed into the final repo structure.
Some more detail
The data acquisition and usage of answers is transparent in the script.
Templates are populated and copied via
this.fs.copyTpl, see for example how the projects README is created:
// Copying README file
this.fs.copyTpl(
this.templatePath('README.md'),
this.destinationPath('README.md'),
{
project_name:this.answers.gitlab_repo,
project_description:this.answers.description_detailed
}
);If you go look on generators/app/templates/README.md, you will find template calls such as for the sectio title:
# <%= project_name%>Structure of the Repo
generators/app
This folder contains the main index.js script that controls Yeomann. It also contains some files that will be copied verbatim into the repo, plus some others, called templates that will first be informed by the data fed to the Yeomann questions.
scripts
This folder contains scripts used for the CI/CD. As of August, 2025; only one exists, in charge of publishing the package to NPM.
