-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added first set of base classes. Configured docs and its publishing
- Loading branch information
1 parent
fa44090
commit 7430e3c
Showing
33 changed files
with
1,188 additions
and
184 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -38,7 +38,7 @@ jobs: | |
run: npm run lint | ||
|
||
- name: Build | ||
run: npm run build:ts | ||
run: npm run build | ||
|
||
- name: Test | ||
run: npm run test |
This file contains 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,66 @@ | ||
# Sample workflow for building and deploying a VitePress site to GitHub Pages | ||
# | ||
name: Deploy VitePress site to Pages | ||
|
||
on: | ||
# Runs on pushes targeting the `main` branch. Change this to `master` if you're | ||
# using the `master` branch as the default branch. | ||
push: | ||
branches: [main] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: pages | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
# Build job | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Not needed if lastUpdated is not enabled | ||
# - uses: pnpm/action-setup@v2 # Uncomment this if you're using pnpm | ||
# - uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun | ||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: npm # or pnpm / yarn | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v4 | ||
- name: Install dependencies | ||
run: npm ci # or pnpm install / yarn install / bun install | ||
- name: Build with VitePress | ||
run: | | ||
npm run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build | ||
touch docs/.vitepress/dist/.nojekyll | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: docs/.vitepress/dist | ||
|
||
# Deployment job | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
needs: build | ||
runs-on: ubuntu-latest | ||
name: Deploy | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
This file contains 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
This file contains 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
This file contains 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
This file contains 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,8 @@ | ||
--vp-c-brand: #2b0f54; | ||
--vp-c-brand-light: #ab1f65; | ||
--vp-c-brand-dark: #2b0f54; | ||
--vp-home-hero-name-color: var(--vp-c-brand); | ||
--vp-button-brand-bg: var(--vp-c-brand); | ||
--vp-button-brand-border: #c9b8a9; | ||
--vp-button-brand-hover-border: var(--vp-button-brand-border); | ||
--vp-button-brand-hover-bg: var(--vp-c-brand-light); |
This file contains 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,6 @@ | ||
import DefaultTheme from 'vitepress/theme'; | ||
import './custom.css'; | ||
|
||
export default { | ||
...DefaultTheme, | ||
}; |
This file contains 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,5 @@ | ||
--- | ||
outline: deep | ||
--- | ||
|
||
# API docs |
This file was deleted.
Oops, something went wrong.
This file contains 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,11 @@ | ||
**Event Sourcing keeps all the facts that happened in our system, and that's powerful!** Facts are stored as events that can be used to make decisions, fine-tune read models, integrate our systems, and enhance our analytics and tracking. All in one package, wash and go! | ||
|
||
Yet, some say that's complex and complicated; Emmett aims to prove that it doesn't have to be like that. We cut the boilerplate and layered madness, letting you focus on delivery. We're opinionated but focus on composition, not magic. Let me show you how. | ||
|
||
## Events | ||
|
||
Events are the centrepiece of event-sourced systems. They represent both critical points of the business process but are also used as the state. That enables you to reflect your business into the code better, getting the synergy. Let's model a simple business process: a shopping cart. You can open it, add or remove the product from it and confirm or cancel. | ||
|
||
We could define it as follows: | ||
|
||
<<< @/snippets/shoppingCart.ts#getting-started-events |
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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,48 @@ | ||
// #region getting-started-events | ||
export type ShoppingCartEvent = | ||
| { | ||
type: 'ShoppingCartOpened'; | ||
data: { | ||
shoppingCartId: string; | ||
clientId: string; | ||
openedAt: string; | ||
}; | ||
} | ||
| { | ||
type: 'ProductItemAddedToShoppingCart'; | ||
data: { | ||
shoppingCartId: string; | ||
productItem: PricedProductItem; | ||
}; | ||
} | ||
| { | ||
type: 'ProductItemRemovedFromShoppingCart'; | ||
data: { | ||
shoppingCartId: string; | ||
productItem: PricedProductItem; | ||
}; | ||
} | ||
| { | ||
type: 'ShoppingCartConfirmed'; | ||
data: { | ||
shoppingCartId: string; | ||
confirmedAt: string; | ||
}; | ||
} | ||
| { | ||
type: 'ShoppingCartCanceled'; | ||
data: { | ||
shoppingCartId: string; | ||
canceledAt: string; | ||
}; | ||
}; | ||
|
||
export interface ProductItem { | ||
productId: string; | ||
quantity: number; | ||
} | ||
|
||
export type PricedProductItem = ProductItem & { | ||
price: number; | ||
}; | ||
// #endregion getting-started-events |
Oops, something went wrong.