INNER CODE UNIT · TypeScript

initialCommit

bitjson/typescript-starter · src/cli/tasks.ts:108

export const initialCommit = (spawner: typeof execa) => async (
  hash: string,
  projectDir: string
): Promise<void> => {
  const opts: Options = {
    cwd: projectDir,
    encoding: 'utf8',
    stdio: 'pipe',
  };
  await spawner('git', ['init'], opts);
  await spawner('git', ['add', '-A'], opts);
  await spawner(
    'git',
    [
      'commit',
      '-m',
      `Initial commit\n\nCreated with bitjson/typescript-starter@${hash}`,
    ],

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…