Skip to content

Commit

Permalink
feat: chdir to root after supabase install
Browse files Browse the repository at this point in the history
  • Loading branch information
maneike committed Oct 17, 2024
1 parent afe3199 commit 122f044
Show file tree
Hide file tree
Showing 5 changed files with 1,698 additions and 4,489 deletions.
7 changes: 4 additions & 3 deletions packages/cli/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/usr/bin/env node
import { createProject } from '@create-stapler-app/core';
import chalk from 'chalk';
import { Command } from 'commander';
import gradient from 'gradient-string';
import inquirer from 'inquirer';
import chalk from 'chalk';
import gradient from 'gradient-string';

import { createProject } from '@create-stapler-app/core';

const asciiArt = `
.&&&% &&&&
Expand Down
4 changes: 2 additions & 2 deletions packages/core/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { execSync } from 'child_process';
import { createEnvFile } from './utils/env/createEnvFile';
import { initializeRepository } from './utils/github/install';
import { preparePayload } from './utils/payload/install';
import { installSupabase } from './utils/supabase/install';
import { prettify } from './utils/prettier/prettify';
import { prepareDrink } from './utils/bar/prepareDrink';
import { initializeRepository } from './utils/github/install';
import { createAndConnectSupabaseProject } from './utils/supabase';
import { installSupabase } from './utils/supabase/install';

interface ProjectOptions {
name: string;
Expand Down
4 changes: 2 additions & 2 deletions packages/core/utils/supabase/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { connectSupabaseProject } from './connectSupabaseProject';
import { createSupabaseProject } from './createSupabaseProject';
import { connectSupabaseProject } from './connectProject';
import { createSupabaseProject } from './createProject';

export const createAndConnectSupabaseProject = async (name: string) => {
createSupabaseProject(name);
Expand Down
8 changes: 5 additions & 3 deletions packages/core/utils/supabase/install.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { execSync } from 'child_process';
import fs from 'fs';
import path from 'path';
import { supabaseFiles } from '../../templates/supabase/installConfig';
import { templateGenerator } from '../generator/generator';
import { supabaseFiles } from '../../templates/supabase/installConfig';
import path from 'path';
import fs from 'fs';

export const installSupabase = async (destinationDirectory: string) => {
console.log('🖇️ Installing supabase-js...');
Expand All @@ -23,4 +23,6 @@ export const installSupabase = async (destinationDirectory: string) => {
console.log('🖇️ Installing Supabase dependencies...');

execSync('pnpm install', { stdio: 'inherit' });

process.chdir('..');
};
Loading

0 comments on commit 122f044

Please sign in to comment.