Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 0 deletions .github/workflows/factory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ jobs:
- fresh-vite-app-vue
- fresh-vite-app
- fresh-vitepress-site
- fresh-viteplus-app
- fresh-viteplus-lib
- fresh-viteplus-monorepo
- fresh-vscode-extension
- fresh-vscode-web-extension

Expand Down
9 changes: 8 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# TypeScript Project Guidelines
# Fresh App Factory Project Guidelines

## Creating and Updating Generators

1. Look at existing generators in `src/generators/` to see the pattern. Notice how Corepack is used to pin pnpm version, etc. Especially consult similar generator
2. Create/update the generator file
3. Test the generator with `bin/run <name>` and inspect the generated files at `workspace/fresh-app/`
4. In case of adding new generator, update `.github/workflows/factory.yml` to add the new generator to the list

## Build & Run Commands

Expand Down
20 changes: 20 additions & 0 deletions src/generators/fresh-viteplus-app.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { defineGenerator } from '../defineGenerator'

export default defineGenerator({
command: [
'curl -fsSL https://vite.plus | CI=true bash',
'export PATH="$HOME/.vite-plus/bin:$PATH"',
'vp create vite:application --directory fresh-app --no-interactive',
'cd fresh-app',
'vp install',
'vp build',
].join('\n'),
displayedCommand: 'vp create vite:application',
description: 'Fresh Vite+ app',
framework: {
name: 'Vite+',
url: 'https://viteplus.dev/',
documentationUrl: 'https://viteplus.dev/guide/',
},
staticOutputDirectory: 'dist',
})
20 changes: 20 additions & 0 deletions src/generators/fresh-viteplus-lib.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { defineGenerator } from '../defineGenerator'

export default defineGenerator({
command: [
'curl -fsSL https://vite.plus | CI=true bash',
'export PATH="$HOME/.vite-plus/bin:$PATH"',
'vp create vite:library --directory fresh-app --no-interactive',
'cd fresh-app',
'vp install',
'vp pack',
].join('\n'),
displayedCommand: 'vp create vite:library',
description: 'Fresh Vite+ library',
framework: {
name: 'Vite+',
url: 'https://viteplus.dev/',
documentationUrl: 'https://viteplus.dev/guide/',
},
staticOutputDirectory: 'dist',
})
20 changes: 20 additions & 0 deletions src/generators/fresh-viteplus-monorepo.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { defineGenerator } from '../defineGenerator'

export default defineGenerator({
command: [
'curl -fsSL https://vite.plus | CI=true bash',
'export PATH="$HOME/.vite-plus/bin:$PATH"',
'vp create vite:monorepo --directory fresh-app --no-interactive',
'cd fresh-app',
'vp install',
'vp build apps/website',
].join('\n'),
displayedCommand: 'vp create vite:monorepo',
description: 'Fresh Vite+ monorepo',
framework: {
name: 'Vite+',
url: 'https://viteplus.dev/',
documentationUrl: 'https://viteplus.dev/guide/',
},
staticOutputDirectory: 'apps/website/dist',
})
Loading