-
Notifications
You must be signed in to change notification settings - Fork 1
Update README files for the monorepo architecture #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,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 | ||
| ``` |
This file contains hidden or 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,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 |
This file contains hidden or 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 |
|---|---|---|
| @@ -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. |
This file contains hidden or 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,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"] | ||
| } | ||
| ``` |
This file contains hidden or 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,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 | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.