From 4901f53e245e9b6273752ccb2b9416f918678ae8 Mon Sep 17 00:00:00 2001 From: Garrett Mills Date: Mon, 12 Apr 2021 16:59:17 +0000 Subject: [PATCH] Update 'README.md' --- README.md | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/README.md b/README.md index a3138db..4784ac1 100644 --- a/README.md +++ b/README.md @@ -49,3 +49,59 @@ To re-build all of the modules, you can run the `pnpm build` command. To rebuild ## Cleaning Up To remove all of the cloned repositories, use `pnpm clean`. **WARNING** this WILL delete ALL files in the repositories, so be sure you don't have any work you want to save. + +# Common Processes + +## Adding a new first-party module + +1. Create the repository in `@extollo`, based on the `@extollo/_template` repo. +2. Add a `clone:module` action to the scripts in `package.json`. Something like: + +```json +{ + "scripts": { + // ... + "clone:module_name": "git clone ${npm_config_git:-https://code.garrettmills.dev/extollo/}forms modules/forms" + } + // ... +} +``` + +3. Add the `clone:module_name` action to the `clone:all` action. +4. Add an `install:module_name` action to the scripts in `package.json`. Make sure it replaces any Extollo modules with symlink versions to the clones versions. For example: + +```json +{ + "scripts": { + // ... + "install:module_name": "cd modules/module_name && pnpm i --save @extollo/cli@file:../cli @extollo/di@file:../di @extollo/lib@file:../lib @extollo/util@file:../util && pnpm run build && cd ../.." + } + // ... +} +``` + +5. Add the `install:module_name` action to the `install:all` action. +6. Add a `build:module_name` action to the scripts ni `package.json`. For example, + +```json +{ + "scripts": { + // ... + "build:module_name": "cd modules/module_name && pnpm run build" + } + // ... +} +``` + +7. Add the `build:module_name` action to the `build:all` action. +8. Add the `modules/module_name` directory to the `clean:modules` action. +9. Install the repository you just added: + +```shell +pnpm clone:module_name && pnpm install:module_name +``` + +10. Enable CI for the repo: + 1. Sync the repositories, then activate the `@extollo/module_name` repository + 2. Add the `npm_password`, `drone_token`, `gitea_token`, and `notify_webhook_url` secrets to the repo for extollo bot. + 3. Edit `.drone.yml` to replace `PACKAGE` with the package name. \ No newline at end of file