Skip to content

Commit

Permalink
refactor(cli)!: remove auto generation of gql types on project creati…
Browse files Browse the repository at this point in the history
…on (#1443)
  • Loading branch information
matthewvolk authored Oct 10, 2024
1 parent 5463157 commit c166d53
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .changeset/brave-shirts-carry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@bigcommerce/create-catalyst": minor
---

BREAKING: Remove automatic generation of GraphQL type definitions on project creation. This results in faster project creation and generation will happen already as part of starting the development sever or kicking off a build
12 changes: 1 addition & 11 deletions packages/create-catalyst/src/commands/create.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { Command, Option } from '@commander-js/extra-typings';
import { input, select } from '@inquirer/prompts';
import chalk from 'chalk';
import { exec as execCallback, execSync } from 'child_process';
import { execSync } from 'child_process';
import { pathExistsSync } from 'fs-extra/esm';
import kebabCase from 'lodash.kebabcase';
import { join } from 'path';
import { promisify } from 'util';
import { z } from 'zod';

import { checkStorefrontLimit } from '../utils/check-storefront-limit';
Expand All @@ -14,11 +13,8 @@ import { Https } from '../utils/https';
import { installDependencies } from '../utils/install-dependencies';
import { login } from '../utils/login';
import { parse } from '../utils/parse';
import { spinner } from '../utils/spinner';
import { writeEnv } from '../utils/write-env';

const exec = promisify(execCallback);

export const create = new Command('create')
.description('Command to scaffold and connect a Catalyst storefront to your BigCommerce store')
.option('--project-name <name>', 'Name of your Catalyst project')
Expand Down Expand Up @@ -230,12 +226,6 @@ export const create = new Command('create')

await installDependencies(projectDir);

await spinner(exec(`pnpm run --prefix ${projectDir} generate`), {
text: 'Creating GraphQL schema...',
successText: 'Created GraphQL schema',
failText: (err) => chalk.red(`Failed to create GraphQL schema: ${err.message}`),
});

console.log(
`\n${chalk.green('Success!')} Created '${projectName}' at '${projectDir}'\n`,
'\nNext steps:\n',
Expand Down

0 comments on commit c166d53

Please sign in to comment.