Update 'README.md'
This commit is contained in:
parent
b13c520a74
commit
4901f53e24
56
README.md
56
README.md
@ -49,3 +49,59 @@ To re-build all of the modules, you can run the `pnpm build` command. To rebuild
|
|||||||
|
|
||||||
## Cleaning Up
|
## 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.
|
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.
|
Loading…
Reference in New Issue
Block a user