Skip to content

Commit a6eb25b

Browse files
committed
feat: Add introduction and philosophy documentation for fluent-asserts
- Created introduction.mdx to provide an overview and quick start guide for fluent-asserts. - Added philosophy.mdx outlining the 4 Rules of Simple Design and the rationale behind fluent-asserts. - Updated index.mdx to highlight the benefits of using fluent-asserts with examples. - Introduced custom CSS styles for documentation to enhance readability and aesthetics. - Added TypeScript configuration for improved type checking in documentation. - Updated dub.json to reflect the new copyright year. - Enhanced the Assert struct with new methods for exception handling, memory allocation checks, and string assertions. - Added unit tests for new Assert methods to ensure functionality.
1 parent e94626f commit a6eb25b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+11483
-4
lines changed

.github/workflows/docs.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Deploy Documentation
2+
3+
on:
4+
push:
5+
branches: [master]
6+
paths:
7+
- 'docs/**'
8+
- 'source/**'
9+
- '.github/workflows/docs.yml'
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
concurrency:
18+
group: "pages"
19+
cancel-in-progress: false
20+
21+
jobs:
22+
build:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 0 # Needed for git tags
29+
30+
- name: Setup Node
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: 20
34+
cache: 'npm'
35+
cache-dependency-path: docs/package-lock.json
36+
37+
- name: Install dependencies
38+
working-directory: docs
39+
run: npm ci
40+
41+
- name: Update version info
42+
working-directory: docs
43+
run: npm run update-version
44+
45+
- name: Extract API docs from D source
46+
working-directory: docs
47+
run: npm run extract-docs
48+
49+
- name: Build documentation site
50+
working-directory: docs
51+
run: npm run build
52+
53+
- name: Upload artifact
54+
uses: actions/upload-pages-artifact@v3
55+
with:
56+
path: docs/dist
57+
58+
deploy:
59+
environment:
60+
name: github-pages
61+
url: ${{ steps.deployment.outputs.page_url }}
62+
needs: build
63+
runs-on: ubuntu-latest
64+
steps:
65+
- name: Deploy to GitHub Pages
66+
id: deployment
67+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
.dub
22
docs.json
33
__dummy.html
4+
5+
# Documentation site (Starlight/Astro)
6+
docs/node_modules/
7+
docs/dist/
8+
docs/.astro/
9+
docs/public/version.json
410
*.o
511
*.obj
612
*.lst

docs/astro.config.mjs

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
import { defineConfig } from 'astro/config';
2+
import starlight from '@astrojs/starlight';
3+
4+
export default defineConfig({
5+
site: 'https://fluentasserts.szabobogdan.com',
6+
integrations: [
7+
starlight({
8+
title: 'fluent-asserts',
9+
logo: {
10+
light: './src/assets/logo.svg',
11+
dark: './src/assets/logo-light.svg',
12+
replacesTitle: true,
13+
},
14+
social: {
15+
github: 'https://github.com/gedaiu/fluent-asserts',
16+
},
17+
sidebar: [
18+
{
19+
label: 'Guide',
20+
items: [
21+
{ label: 'Introduction', link: '/guide/introduction/' },
22+
{ label: 'Installation', link: '/guide/installation/' },
23+
{ label: 'Assertion Styles', link: '/guide/assertion-styles/' },
24+
{ label: 'Core Concepts', link: '/guide/core-concepts/' },
25+
{ label: 'Extending', link: '/guide/extending/' },
26+
{ label: 'Philosophy', link: '/guide/philosophy/' },
27+
{ label: 'Contributing', link: '/guide/contributing/' },
28+
],
29+
},
30+
{
31+
label: 'API Reference',
32+
items: [
33+
{ label: 'Overview', link: '/api/' },
34+
{
35+
label: 'Equality',
36+
autogenerate: { directory: 'api/equality' },
37+
},
38+
{
39+
label: 'Comparison',
40+
autogenerate: { directory: 'api/comparison' },
41+
},
42+
{
43+
label: 'Strings',
44+
autogenerate: { directory: 'api/strings' },
45+
},
46+
{
47+
label: 'Ranges & Arrays',
48+
autogenerate: { directory: 'api/ranges' },
49+
},
50+
{
51+
label: 'Callables & Exceptions',
52+
autogenerate: { directory: 'api/callable' },
53+
},
54+
{
55+
label: 'Types',
56+
autogenerate: { directory: 'api/types' },
57+
},
58+
],
59+
},
60+
],
61+
customCss: ['./src/styles/custom.css'],
62+
}),
63+
],
64+
});

0 commit comments

Comments
 (0)