Navigation Menu

Skip to content

LandonSchropp/yeoman-generators

Repository files navigation

Landon Schropp's Yeoman Generators

This is my personal, opinionated collection of Yeoman generators to make spinning up and configuring TypeScript projects easy and enjoyable.

TL/DR

npx yo @landonschropp/init
npx yo @landonschropp/typescript
npx yo @landonschropp/jest
npx yo @landonschropp/eslint

The Generators

This project includes several generators.

These generators a built to prompt as little as possible, so they tend to use the package.json file to determine their configuration. Make sure you have your core tools installed (such as React) before running the generators that depend on them.

You can run the generator of your choice with NPX. NPX allows you to run the generator once without having to install anything.

npx yo @landonschropp/<generator>

You can also see the documentation and options for each generator by including the --help flag.

npx @landonschropp/eslint --help

You can run any of these generators independently, but if you're running more than one do so in the order listed above.

Development

Updating

This repo uses Yarn workspaces, so updating all of the packages is easy.

yarn upgrade-interactive --latest

Publishing

Publishing all of the packages is also a breeze thanks to Lerna. First, make sure the NPM_TOKEN environment variable is set. Then, all you need to do is run the following command.

lerna publish

Example Project

While developing a generator, it's common to create an empty directory to run the generator in. Because this is done so frequently, this repository includes a handy script that does this automatically.

yarn set-up-example-project

This script does a few things for you:

  • It automatically runs yarn install so you don't have to.
  • It creates a new example directory, sets it up as a Node package, and initializes a Git repository so you can any changes your package may introduce.
  • It links all of the packages in the packages directory via Yarn.

Once the script is done, all you need to do is change into the example directory and run yo @landonschropp/<generator> to test out one of the generators.

About

A collection of Yeoman generators tailed for Node.js and browser development

Resources

Stars

Watchers

Forks

Packages

No packages published