Run Yeoman Generator

Action ID: run:yeoman
NPM Package:

@backstage/plugin-scaffolder-backend-module-yeoman

Description

Runs Yeoman on an installed Yeoman generator

Input Schema

PropertyTypeDescriptionRequired
argsarrayArguments to pass on to Yeoman for templating
optionsobjectOptions to pass on to Yeoman for templating
namespacestringYeoman generator namespace, e.g: node:app

Output Schema

No output schema defined for this action.

Usage Examples

Generate a Node.js library with generator-node

Runs the node app generator to scaffold a TypeScript library. Use this when you want Yeoman to create a package skeleton, then handle install and publishing later with actions like publish:github.

Copy
steps:
  - id: generate-node-lib
    action: run:yeoman
    input:
      namespace: node:app
      options:
        name: ${{ parameters.packageName }}
        description: Utility functions for internal services
        typescript: true
        githubAccount: acme-inc
        skip-install: true
        skip-cache: true

Create a web app with generator-webapp and skip installs

Runs the webapp generator and skips installs and cache to keep the job fast. Use this when a later step will run dependency installation or container builds.

Copy
steps:
  - id: generate-webapp
    action: run:yeoman
    input:
      namespace: webapp:app
      options:
        name: ${{ parameters.appName }}
        sass: true
        babel: true
        skip-install: true
        skip-cache: true

Scaffold a JHipster service with opinionated options

Runs the JHipster app generator with preset options for auth and database. Use this to standardize new Spring Boot services and later publish with publish:github.

Copy
steps:
  - id: generate-jhipster-app
    action: run:yeoman
    input:
      namespace: jhipster:app
      options:
        base-name: ${{ parameters.serviceId }}
        package-name: com.acme.${{ parameters.serviceId }}
        auth: jwt
        db: postgresql
        reactive: false
        skip-install: true
        skip-cache: true

Add an Angular service with a subgenerator

Runs an Angular subgenerator to add a service into an existing project. Use this when you want Yeoman to add code to a checked out workspace after a fetch step like fetch:template.

Copy
steps:
  - id: add-angular-service
    action: run:yeoman
    input:
      namespace: angular:service
      args:
        - user
      options:
        module: app
        spec: true
        skip-cache: true

Use an internal company generator with args and options

Runs a custom company microservice generator with both args and options. Use this to enforce platform standards and pass dynamic values from template parameters.

Copy
steps:
  - id: generate-company-microservice
    action: run:yeoman
    input:
      namespace: company:microservice
      args:
        - ${{ parameters.serviceName }}
      options:
        language: go
        ci: github-actions
        owner: ${{ parameters.owner }}
        registry: ghcr.io/acme
        port: 8080
        skip-install: true