Skip to content

Commit 974ece1

Browse files
authored
Update README files for the monorepo architecture (#36)
This PR updates README files for the monorepo. Follow-up to #34
1 parent ed94b94 commit 974ece1

File tree

5 files changed

+163
-49
lines changed

5 files changed

+163
-49
lines changed

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# watcloud-emails
2+
3+
A monorepo containing email templates and related tooling for WATcloud.
4+
5+
## Packages
6+
7+
### Core Packages
8+
- `@watonomous/watcloud-email-templates` – Email templates
9+
- `@repo/utils` – Shared utilities
10+
- `@repo/ts-config` – Shared TypeScript configuration
11+
12+
### Applications
13+
- `@watonomous/watcloud-email-cli` – Command-line interface for working with the templates
14+
15+
## Development
16+
17+
### Getting Started
18+
19+
1. Clone the repository
20+
2. Install dependencies:
21+
```sh
22+
npm ci
23+
```
24+
3. Start the development server:
25+
```sh
26+
npm run dev
27+
```
28+
4. Build all packages:
29+
```sh
30+
npm run build
31+
```

apps/cli/README.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# @watonomous/watcloud-email-cli
2+
3+
Command line interface for working with WATcloud email templates.
4+
5+
## Development
6+
7+
### Getting Started
8+
9+
1. From the root of the monorepo, install dependencies:
10+
```sh
11+
npm ci
12+
```
13+
14+
2. Start the development server:
15+
```sh
16+
npm run dev
17+
```
18+
19+
### Building
20+
21+
To build the CLI:
22+
23+
```sh
24+
# From the root of the monorepo
25+
npm run build
26+
```
27+
28+
## Usage
29+
30+
After installation (see below) you can run:
31+
32+
```sh
33+
watcloud-emails --help
34+
```
35+
36+
This shows all available commands and options.
37+
38+
### Running Locally During Development
39+
40+
After building the CLI you can run it directly:
41+
42+
```sh
43+
node dist/index.js --help
44+
```
45+
46+
## Installation
47+
48+
### Using a Specific Version
49+
50+
1. Find a version from the [releases](https://github.com/WATonomous/watcloud-emails/releases) page (e.g. `0.0.2`).
51+
2. Run the following command:
52+
```sh
53+
VERSION=<version>
54+
npx https://github.com/WATonomous/watcloud-emails/releases/download/v${VERSION}/watonomous-watcloud-email-cli-${VERSION}.tgz --help
55+
```
56+
57+
### Installing from a CI artifact
58+
59+
You can also download the latest artifacts from the CI builds and install them manually in the same way.
60+
61+
## Contributing
62+
63+
1. Make your changes in the source files
64+
2. Run tests to ensure everything works
65+
3. Submit a pull request

packages/templates/README.md

Lines changed: 8 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,19 @@
1-
# watcloud-emails
1+
# @watonomous/watcloud-email-templates
22

33
A collection of email templates used by [WATcloud](https://cloud.watonomous.ca/).
44

5-
## Getting started
6-
7-
1. Find a version from the [releases](https://github.com/WATonomous/watcloud-emails/releases) page (e.g. `0.0.2`).
8-
2. Run the following command
9-
```sh
10-
VERSION=<version>
11-
npx https://github.com/WATonomous/watcloud-emails/releases/download/v${VERSION}/watonomous-watcloud-email-cli-${VERSION}.tgz --help
12-
```
13-
145
## Development
156

16-
### Emails
17-
18-
```sh
19-
npm ci
20-
npm run dev
21-
```
7+
1. Start the development server from the root of the monorepo:
8+
```sh
9+
npm run dev
10+
```
11+
2. Open [http://localhost:3000](http://localhost:3000) in your browser to preview the email templates.
2212

23-
Open [localhost:3000](http://localhost:3000) with your browser to see email previews.
24-
25-
### CLI
26-
27-
```sh
28-
npm run build
29-
node ./apps/cli/dist/index.js
30-
```
13+
## Building
3114

32-
#### Packaging the CLI
15+
To build the templates for production, run from the root of the monorepo:
3316

3417
```sh
3518
npm run build
36-
37-
cd apps/cli
38-
npm version --no-git-tag-version 0.0.0-dev
39-
npm pack --pack-destination .
4019
```
41-
42-
A `watonomous-watcloud-email-cli-0.0.0-dev.tgz` file will be created in the current directory.
43-
Use it as follows:
44-
45-
```sh
46-
npx watonomous-watcloud-email-cli-0.0.0-dev.tgz --help
47-
# or
48-
npm install -g watonomous-watcloud-email-cli-0.0.0-dev.tgz
49-
watcloud-emails --help
50-
```
51-
52-
## Releasing
53-
54-
Releases are manually created from the [Releases page](https://github.com/WATonomous/watcloud-emails/releases).
55-
CI will automatically build the tarball and publish it to the release page.
56-
Release notes can be auto-generated via the web interface.
57-
58-
Please follow [semantic versioning](https://semver.org/) when creating tags for releases.
59-
Tags should be prefixed with `v` (e.g. `v1.0.0`).
60-
Version numbers less than `1.0.0` should be considered unstable and may have breaking changes in minor versions.

packages/ts-config/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# @repo/ts-config
2+
3+
Shared TypeScript configuration for the WATcloud emails monorepo.
4+
5+
## Usage
6+
7+
In any package that needs TypeScript configuration, extend the appropriate config in your `tsconfig.json`:
8+
9+
```json
10+
{
11+
"extends": "@repo/ts-config/tsconfig.json",
12+
"compilerOptions": {
13+
"outDir": "./dist"
14+
},
15+
"include": ["src"]
16+
}
17+
```

packages/utils/README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# @repo/utils
2+
3+
Shared utilities for working with email templates in the WATcloud ecosystem.
4+
5+
## Features
6+
7+
- Common validation functions
8+
- Email template helpers
9+
- Shared types and interfaces
10+
- Utility functions for email rendering
11+
12+
## Usage
13+
14+
Add the project as a dependency in your `package.json`:
15+
16+
```json
17+
{
18+
"dependencies": {
19+
"@repo/utils": "*"
20+
}
21+
}
22+
```
23+
24+
Import the utilities in your code:
25+
26+
```typescript
27+
import { validateEmail } from '@repo/utils';
28+
29+
// Example usage
30+
const isValid = validateEmail('user@example.com');
31+
```
32+
33+
## Development
34+
35+
This package is built as part of the monorepo build process. To develop locally:
36+
37+
1. Make your changes in the source files
38+
2. Run tests:
39+
```sh
40+
npm test
41+
```
42+
3. The package will be built automatically when running `npm run build` from the root

0 commit comments

Comments
 (0)