Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# watcloud-emails

A monorepo containing email templates and related tooling for WATcloud.

## Packages

### Core Packages
- `@watonomous/watcloud-email-templates` – Email templates
- `@repo/utils` – Shared utilities
- `@repo/ts-config` – Shared TypeScript configuration

### Applications
- `@watonomous/watcloud-email-cli` – Command-line interface for working with the templates

## Development

### Getting Started

1. Clone the repository
2. Install dependencies:
```sh
npm ci
```
3. Start the development server:
```sh
npm run dev
```
4. Build all packages:
```sh
npm run build
```
65 changes: 65 additions & 0 deletions apps/cli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# @watonomous/watcloud-email-cli

Command line interface for working with WATcloud email templates.

## Development

### Getting Started

1. From the root of the monorepo, install dependencies:
```sh
npm ci
```

2. Start the development server:
```sh
npm run dev
```

### Building

To build the CLI:

```sh
# From the root of the monorepo
npm run build
```

## Usage

After installation (see below) you can run:

```sh
watcloud-emails --help
```

This shows all available commands and options.

### Running Locally During Development

After building the CLI you can run it directly:

```sh
node dist/index.js --help
```

## Installation

### Using a Specific Version

1. Find a version from the [releases](https://github.com/WATonomous/watcloud-emails/releases) page (e.g. `0.0.2`).
2. Run the following command:
```sh
VERSION=<version>
npx https://github.com/WATonomous/watcloud-emails/releases/download/v${VERSION}/watonomous-watcloud-email-cli-${VERSION}.tgz --help
```

### Installing from a CI artifact

You can also download the latest artifacts from the CI builds and install them manually in the same way.

## Contributing

1. Make your changes in the source files
2. Run tests to ensure everything works
3. Submit a pull request
57 changes: 8 additions & 49 deletions packages/templates/README.md
Original file line number Diff line number Diff line change
@@ -1,60 +1,19 @@
# watcloud-emails
# @watonomous/watcloud-email-templates

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

## Getting started

1. Find a version from the [releases](https://github.com/WATonomous/watcloud-emails/releases) page (e.g. `0.0.2`).
2. Run the following command
```sh
VERSION=<version>
npx https://github.com/WATonomous/watcloud-emails/releases/download/v${VERSION}/watonomous-watcloud-email-cli-${VERSION}.tgz --help
```

## Development

### Emails

```sh
npm ci
npm run dev
```
1. Start the development server from the root of the monorepo:
```sh
npm run dev
```
2. Open [http://localhost:3000](http://localhost:3000) in your browser to preview the email templates.

Open [localhost:3000](http://localhost:3000) with your browser to see email previews.

### CLI

```sh
npm run build
node ./apps/cli/dist/index.js
```
## Building

#### Packaging the CLI
To build the templates for production, run from the root of the monorepo:

```sh
npm run build

cd apps/cli
npm version --no-git-tag-version 0.0.0-dev
npm pack --pack-destination .
```

A `watonomous-watcloud-email-cli-0.0.0-dev.tgz` file will be created in the current directory.
Use it as follows:

```sh
npx watonomous-watcloud-email-cli-0.0.0-dev.tgz --help
# or
npm install -g watonomous-watcloud-email-cli-0.0.0-dev.tgz
watcloud-emails --help
```

## Releasing

Releases are manually created from the [Releases page](https://github.com/WATonomous/watcloud-emails/releases).
CI will automatically build the tarball and publish it to the release page.
Release notes can be auto-generated via the web interface.

Please follow [semantic versioning](https://semver.org/) when creating tags for releases.
Tags should be prefixed with `v` (e.g. `v1.0.0`).
Version numbers less than `1.0.0` should be considered unstable and may have breaking changes in minor versions.
17 changes: 17 additions & 0 deletions packages/ts-config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# @repo/ts-config

Shared TypeScript configuration for the WATcloud emails monorepo.

## Usage

In any package that needs TypeScript configuration, extend the appropriate config in your `tsconfig.json`:

```json
{
"extends": "@repo/ts-config/tsconfig.json",
"compilerOptions": {
"outDir": "./dist"
},
"include": ["src"]
}
```
42 changes: 42 additions & 0 deletions packages/utils/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# @repo/utils

Shared utilities for working with email templates in the WATcloud ecosystem.

## Features

- Common validation functions
- Email template helpers
- Shared types and interfaces
- Utility functions for email rendering

## Usage

Add the project as a dependency in your `package.json`:

```json
{
"dependencies": {
"@repo/utils": "*"
}
}
```

Import the utilities in your code:

```typescript
import { validateEmail } from '@repo/utils';

// Example usage
const isValid = validateEmail('user@example.com');
```

## Development

This package is built as part of the monorepo build process. To develop locally:

1. Make your changes in the source files
2. Run tests:
```sh
npm test
```
3. The package will be built automatically when running `npm run build` from the root