-
Welcome to your Shakespeare project!
-
This is a basic React app template.
-
- )
-}
-
-export default App`,
- 'vite.config.js': `import { defineConfig } from 'vite'
-import react from '@vitejs/plugin-react'
-
-export default defineConfig({
- plugins: [react()],
-})`
- };
-
- for (const [filename, content] of Object.entries(files)) {
- const filePath = `${projectPath}/${filename}`;
- const dir = filePath.split('/').slice(0, -1).join('/');
- try {
- await this.fs.promises.mkdir(dir);
- } catch {
- // Directory might already exist
- }
- await this.fs.promises.writeFile(filePath, content);
- }
+ // Create a LightningFS instance for git operations
+ const gitFS = new LightningFS('shakespeare-fs');
+ await git.clone({
+ fs: gitFS,
+ http,
+ dir: projectPath,
+ url: GIT_TEMPLATE_URL,
+ singleBranch: true,
+ depth: 1,
+ });
}
async getProjects(): Promise