From 816607103e62d98859a457579b508b1a4ef8c248 Mon Sep 17 00:00:00 2001 From: Thai Pangsakulyanont Date: Mon, 26 Feb 2024 10:55:17 +0000 Subject: [PATCH] add remix SPA factory --- .github/workflows/factory.yml | 1 + src/generators/fresh-remix-spa.ts | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 src/generators/fresh-remix-spa.ts diff --git a/.github/workflows/factory.yml b/.github/workflows/factory.yml index b9c9391..057afb6 100644 --- a/.github/workflows/factory.yml +++ b/.github/workflows/factory.yml @@ -26,6 +26,7 @@ jobs: - fresh-react-app-typescript - fresh-react-app - fresh-remix-app + - fresh-remix-spa - fresh-solid-app-ts - fresh-sveltekit-app-typescript - fresh-t3-app diff --git a/src/generators/fresh-remix-spa.ts b/src/generators/fresh-remix-spa.ts new file mode 100644 index 0000000..3da251e --- /dev/null +++ b/src/generators/fresh-remix-spa.ts @@ -0,0 +1,17 @@ +import { defineGenerator } from '../defineGenerator' + +export default defineGenerator({ + command: [ + 'pnpm create remix fresh-app --no-git-init --no-install --template remix-run/remix/templates/spa', + 'cd fresh-app', + 'corepack use pnpm@latest', + 'pnpm build', + ].join('\n'), + displayedCommand: + 'pnpm create remix --template remix-run/remix/templates/spa', + description: 'Fresh Remix SPA', + longDescription: 'Fresh Remix single-page app', + frameworkUrl: 'https://remix.run/', + frameworkDocumentationUrl: 'https://remix.run/docs', + staticOutputDirectory: 'build/client', +})