-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a7491a8
commit cc1b0fb
Showing
2 changed files
with
64 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Yeoman generator for package monorepo | ||
|
||
This Yeoman generator helps you set up a package monorepo with two available generators: `app` and `fastify-plugin`. | ||
|
||
# Generators | ||
- **app**: sets up a new monorepo | ||
- **fastify-plugin**: sets up a fastify plugin within the monorepo | ||
|
||
# Requirements | ||
- [yo](https://github.com/yeoman/yo) | ||
- [shipjs](https://github.com/algolia/shipjs) (optional, for deployment purposes) | ||
|
||
To install `shipjs` and `yo` globally, run: | ||
|
||
```bash | ||
npm install -g shipjs yo | ||
``` | ||
|
||
# Installation | ||
1. Clone this repo locally and navigate to the project directory and install dependencies: | ||
|
||
```bash | ||
make install | ||
``` | ||
|
||
2. Link this generator locally so that the `yo` command can recognize it: | ||
|
||
```bash | ||
npm link | ||
``` | ||
|
||
# Usage | ||
|
||
## Generate the monorepo | ||
Run the following command and follow the prompts to generate your monorepo setup: | ||
|
||
```bash | ||
yo package-monorepo | ||
``` | ||
|
||
This command will create a directory with the name you provide as `Package name`. Navigate to this directory: | ||
|
||
```bash | ||
cd <Package name> | ||
``` | ||
|
||
## Initialize git repository | ||
|
||
Initialize a Git repository in your new project directory: | ||
|
||
```bash | ||
git init | ||
``` | ||
|
||
## Generate a fastify plugin only (experimental) | ||
To generate only the Fastify plugin, use: | ||
|
||
```bash | ||
yo package-monorepo:fastify-plugin | ||
``` | ||
This will create the fastify plugin setup without the rest of the monorepo structure. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters