chiubaka / genesis

Creates standardized monorepos and pre-configured project scaffolding for Chiubaka Technologies projects.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

genesis

circleci codecov

This repository contains packages and support tooling for genesis, a Chiubaka Technologies CLI for generating standard Chiubaka Technologies monorepos.

At time of writing, it uses nx under the hood via @chiubaka/nx-plugin, a custom Nx plugin that provides a preset generator to modify initial workspace generation.

This project actually started out as just an Nx plugin, but due to limitations in customization capabilities provided to preset generators, ended up growing into a CLI that wraps Nx. This allows us to control the CLI options passed down to Nx and name them appropriately so that 1) the user does not have to remember Nx CLI options and 2) option naming is less confusing, since Nx operates using a slightly different paradigm (e.g. Nx expects generation of org-level monorepos, but we are not using it for that purpose).

Development

Setup

  1. Clone this repo
  2. Run yarn install in the project root
  3. If you don't already have it, install Docker and Docker Compose (required for E2E testing)

Testing

E2E

E2E testing requires docker-compose installed. Before running E2E tests, run yarn start:verdaccio.

Common Commands

  • nx e2e genesis-e2e
    • Runs E2E tests for the genesis package (WARNING: this takes awhile)
  • nx test nx-plugin
    • Runs unit tests for the nx-plugin package
  • yarn deploy:genesis:local
    • verdaccio server must be active somewhere in the background (simply run yarn verdaccio from the command line while in the project root)
    • Publishes @chiubaka/genesis locally and installs it globally.
    • genesis can then be run directly from the command line.
  • yarn deploy:preset:local
    • verdaccio server must be active somewhere in the background (simply run yarn verdaccio from the command line while in the project root)
    • Packages up @chiubaka/nx-plugin and deploys it locally to generate a workspace
    • Output workspace shows up in tmp/nx-e2e/preset

About

Creates standardized monorepos and pre-configured project scaffolding for Chiubaka Technologies projects.


Languages

Language:TypeScript 97.0%Language:Ruby 1.6%Language:JavaScript 0.7%Language:Shell 0.7%