Skip to content
Open
Show file tree
Hide file tree
Changes from 3 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
5 changes: 5 additions & 0 deletions .changeset/beige-parents-bake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@mittwald/hello-world-extension": patch
---

added scripts to clean up code samples and reduce this project to a nearly blank slate
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,14 @@
"docker:prod": "docker compose up",
"docker:prod:build": "docker compose up --build",
"docker:prod:down": "docker compose down",
"publish-package": "pnpm run build && pnpm run check && changeset version && changeset publish"
"publish-package": "pnpm run build && pnpm run check && changeset version && changeset publish",
"cleanup:webhooks": "rm -r ./src/routes/api/ && pnpm run build",
"cleanup:db": "rm ./src/db/schema.ts && touch ./src/db/schema.ts",
"cleanup:comments": "rm -fr src/components/comments src/domain/comments src/serverFunctions/comments && awk '!/Comment/' ./src/routes/index.tsx > tmp.tsx && mv tmp.tsx ./src/routes/index.tsx",
"cleanup:fragment": "find ./src/components ! -name 'ReadmeCard.tsx' -type f -exec rm -f {} + && sed -i 's/MStudioFrontendFragment/ReadmeCard/g' src/routes/index.tsx",
"cleanup:cleanup": "jq '.scripts |= with_entries(select(.key | startswith(\"cleanup\") | not))' package.json > tmp.json && mv tmp.json package.json",
"cleanup:git": "read -p 'cleanup git?[yes/no]' a && [ $a == \"yes\" ] && rm -rf ./.git",
"cleanup:all": "pnpm run cleanup:db && pnpm run cleanup:comments && pnpm run cleanup:webhooks && pnpm run cleanup fragment && pnpm run cleanup:git && pnpm run cleanup:cleanup"
},
"dependencies": {
"@mittwald/api-client": "^4.267.0",
Expand Down
32 changes: 32 additions & 0 deletions src/components/MStudioFrontendFragment.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { ColumnLayout, Section } from "@mittwald/flow-remote-react-components";
import { Title } from "@mittwald/mstudio-ext-react-components";
import { APIReferenceCard } from "@/components/APIReferenceCard.tsx";
import { CommentsCard } from "@/components/comments/CommentsCard";
import { DeveloperPortalCard } from "@/components/DeveloperPortalCard.tsx";
import { FlowDocumentationCard } from "@/components/FlowDocumentationCard.tsx";
import { GreetingCard } from "@/components/GreetingCard.tsx";
import { ProjectCard } from "@/components/project/ProjectCard.tsx";
import { ReadmeCard } from "@/components/ReadmeCard.tsx";

export function MStudioFrontendFragment() {
return (
<>
<Title>Hallo Contributor!</Title>
<Section>
<ColumnLayout m={[1]} l={[3, 2]}>
<ColumnLayout m={[1]}>
<GreetingCard />
<ProjectCard />
<CommentsCard />
</ColumnLayout>
<ColumnLayout m={[1]}>
<DeveloperPortalCard />
<APIReferenceCard />
<FlowDocumentationCard />
</ColumnLayout>
</ColumnLayout>
<ReadmeCard />
</Section>
</>
);
}
29 changes: 2 additions & 27 deletions src/routes/index.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
import { ColumnLayout, Section } from "@mittwald/flow-remote-react-components";
import { Title } from "@mittwald/mstudio-ext-react-components";
import { createFileRoute } from "@tanstack/react-router";
import { APIReferenceCard } from "@/components/APIReferenceCard.tsx";
import { CommentsCard } from "@/components/comments/CommentsCard";
import { DeveloperPortalCard } from "@/components/DeveloperPortalCard.tsx";
import { FlowDocumentationCard } from "@/components/FlowDocumentationCard.tsx";
import { GreetingCard } from "@/components/GreetingCard.tsx";
import { ProjectCard } from "@/components/project/ProjectCard.tsx";
import { ReadmeCard } from "@/components/ReadmeCard.tsx";
import { MStudioFrontendFragment } from "@/components/MStudioFrontendFragment.tsx";

export const Route = createFileRoute("/")({
component: App,
Expand All @@ -16,23 +8,6 @@ export const Route = createFileRoute("/")({

function App() {
return (
<>
<Title>Hallo Contributor!</Title>
<Section>
<ColumnLayout m={[1]} l={[3, 2]}>
<ColumnLayout m={[1]}>
<GreetingCard />
<ProjectCard />
<CommentsCard />
</ColumnLayout>
<ColumnLayout m={[1]}>
<DeveloperPortalCard />
<APIReferenceCard />
<FlowDocumentationCard />
</ColumnLayout>
</ColumnLayout>
<ReadmeCard />
</Section>
</>
<MStudioFrontendFragment />
);
}