From 660954428b72b8253bd0fd54662ee177da350d74 Mon Sep 17 00:00:00 2001 From: Felix Becker Date: Sat, 4 Aug 2018 02:44:51 +0200 Subject: [PATCH] feat: create src directory --- src/cli.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/cli.ts b/src/cli.ts index be069b0c..57335ac7 100755 --- a/src/cli.ts +++ b/src/cli.ts @@ -4,7 +4,7 @@ import 'source-map-support/register' import chalk from 'chalk' import exec = require('execa') import { prompt } from 'inquirer' -import { exists, writeFile } from 'mz/fs' +import { exists, mkdir, writeFile } from 'mz/fs' import * as path from 'path' import { createBuildkiteClient, initBuildkite } from './buildkite' import { CodeCovRepo, createCodeCovClient, getCodeCovBadge } from './codecov' @@ -224,6 +224,15 @@ async function main(): Promise { await writeFile('package.json', JSON.stringify(packageJson, null, 2)) } + try { + console.log('📂 Creating src directory') + await mkdir('src') + } catch (err) { + if (err.code !== 'EEXIST') { + throw err + } + } + console.log('📦 Installing dependencies') await exec( 'npm',