Skip to content

Commit

Permalink
Added documentation and refactored to MJCZone.DapperMatic
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjcowan committed Dec 12, 2024
1 parent 01577f1 commit cfe78a6
Show file tree
Hide file tree
Showing 228 changed files with 17,112 additions and 11,774 deletions.
27 changes: 25 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,35 @@ jobs:
run: dotnet build --configuration Release /p:Version=${VERSION_NUMBER}

- name: Test
run: dotnet test --configuration Release /p:Version=${VERSION_NUMBER} --no-build
run: |
dotnet test --configuration Release /p:Version=${VERSION_NUMBER} --no-build
# replace VERSION_NUMBER in docs/docs.config.json with ${VERSION_NUMBER}
sed -i "s/VERSION_NUMBER/${VERSION_NUMBER}/g" docs/docs.config.json
- name: Pack
run: dotnet pack --configuration Release /p:Version=${VERSION_NUMBER} --no-build --output nupkgs

- name: Push
run: dotnet nuget push nupkgs/${PACKAGE_ID}.${VERSION_NUMBER}.nupkg
env:
PACKAGE_ID: "DapperMatic"
PACKAGE_ID: "MJCZone.DapperMatic"

- name: Upload Pages Artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/

# Deploy to GitHub Pages
deploy:
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*.userosscache
*.sln.docstates
__delete/
nuget.config

# DocFx generated files
docs/**/toc.yml
Expand Down
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"files.associations": {
"*.vue": "html"
},
"vetur.validation.template": false,
"vetur.validation.script": false,
"vetur.validation.style": false
}
4 changes: 2 additions & 2 deletions DapperMatic.sln → MJCZone.DapperMatic.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{80E77F84-7DB0-4CBF-9E43-4A6E9F1758B2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DapperMatic", "src\DapperMatic\DapperMatic.csproj", "{48C04108-798F-4CED-8874-D146500778EB}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MJCZone.DapperMatic", "src\MJCZone.DapperMatic\MJCZone.DapperMatic.csproj", "{48C04108-798F-4CED-8874-D146500778EB}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{C1CEAB9E-CD38-4AA7-B004-B0248F7C39A7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DapperMatic.Tests", "tests\DapperMatic.Tests\DapperMatic.Tests.csproj", "{9FF5A12B-6617-4492-9BD0-434C58051054}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MJCZone.DapperMatic.Tests", "tests\MJCZone.DapperMatic.Tests\MJCZone.DapperMatic.Tests.csproj", "{9FF5A12B-6617-4492-9BD0-434C58051054}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Files", "Solution Files", "{93285C01-B819-4C94-8A18-0CCC817EB3EE}"
ProjectSection(SolutionItems) = preProject
Expand Down
148 changes: 74 additions & 74 deletions README.md

Large diffs are not rendered by default.

99 changes: 99 additions & 0 deletions docs/components/docs-drawer.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
<script>
const { ref, defineComponent, computed } = Vue;
export default defineComponent({
name: "DocsDrawerLeft",
props: ["config", "leftDrawerOpen", "selectedItem"],
emits: ["update:leftDrawerOpen", "update:selectedItem"],
setup(props, ctx) {
const leftDrawerOpen = computed({
get: () => props.leftDrawerOpen,
set: (v) => ctx.emit("update:leftDrawerOpen", v),
});
const selectedItem = computed({
get: () => props.selectedItem,
set: (v) => ctx.emit("update:selectedItem", v),
});
// load expanded sidebar items from local storage
const __expanded = Quasar.LocalStorage.getItem("sidebarItemsExpanded");
const expandedItems = ref(
Array.isArray(__expanded)
? __expanded
: props.config?.content?.expanded || []
);
function expandedUpdated(v) {
Quasar.LocalStorage.setItem("sidebarItemsExpanded", v);
}
return {
config: props.config,
leftDrawerOpen,
selectedItem,
expandedItems,
expandedUpdated,
};
},
});
</script>
<template>
<q-drawer
class="left-drawer"
show-if-above
v-model="leftDrawerOpen"
side="left"
bordered
>
<div
class="drawer-section-label text-h3 text-weight-regular q-px-md q-pt-md"
>
<span>{{ config.content.label || "Content" }}</span>
</div>
<div class="q-pa-md q-pt-none q-gutter-sm">
<q-tree
dense
node-key="id"
no-connectors
no-selection-unset
:nodes="config.content.items || []"
v-model:expanded="expandedItems"
v-model:selected="selectedItem"
@update:expanded="expandedUpdated"
/>
</div>
<div
class="drawer-section-label text-h3 text-weight-regular q-px-md q-pt-md"
>
<span>{{ config.packages.label || "Packages" }}</span>
</div>
<div class="q-pa-md q-pt-none q-gutter-sm">
<q-tree
dense
node-key="id"
no-connectors
no-selection-unset
:nodes="config.packages.items || []"
v-model:expanded="expandedItems"
v-model:selected="selectedItem"
@update:expanded="expandedUpdated"
/>
</div>
<div
class="drawer-section-label text-h3 text-weight-regular q-px-md q-pt-md"
>
<span>{{ config.about.label || "About" }}</span>
</div>
<div class="q-pa-md q-pt-none q-gutter-sm">
<q-tree
dense
node-key="id"
no-connectors
no-selection-unset
:nodes="config.about.items || []"
v-model:expanded="expandedItems"
v-model:selected="selectedItem"
@update:expanded="expandedUpdated"
/>
</div>
</q-drawer>
</template>
67 changes: 67 additions & 0 deletions docs/components/docs-header.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<script>
const { ref, defineComponent } = Vue;
export default defineComponent({
name: "DocsHeaderToolbar",
props: ["title", "repositoryUrl", "version"],
emits: ["toggleLeftDrawer"],
setup(props, ctx) {
function toggleLeftDrawer() {
ctx.emit("toggleLeftDrawer");
}
return {
toggleLeftDrawer,
};
},
});
</script>
<template>
<q-header class="q-py-sm q-px-md">
<q-toolbar class="q-mx-auto">
<q-toolbar-title>
<div>
<q-icon name="code" size="lg"></q-icon>
<q-btn
flat
unelevated
:ripple="false"
no-caps
href="/"
class="btn--no-hover q-px-md q-py-md page-title"
:label="title"
>
<q-badge color="accent" floating style="top: 9px">{{
version
}}</q-badge>
</q-btn>
</div>
</q-toolbar-title>
<q-separator></q-separator>
<q-btn
dense
class="text-white q-mr-xs"
flat
round
target="_blank"
:href="repositoryUrl"
>
<q-icon>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512">
<!--!Font Awesome Free 6.7.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->
<path
fill="#fff"
d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3 .3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5 .3-6.2 2.3zm44.2-1.7c-2.9 .7-4.9 2.6-4.6 4.9 .3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3 .7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3 .3 2.9 2.3 3.9 1.6 1 3.6 .7 4.3-.7 .7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3 .7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3 .7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"
/>
</svg>
</q-icon>
</q-btn>
<q-btn
dense
flat
round
icon="menu"
@click="toggleLeftDrawer"
class="q-mr-sm"
></q-btn>
</q-toolbar>
</q-header>
</template>
Loading

0 comments on commit cfe78a6

Please sign in to comment.