From dfd426236b02e690762e5060f9e1527eead2b817 Mon Sep 17 00:00:00 2001 From: rakannimer Date: Fri, 29 Nov 2019 17:07:08 +0200 Subject: [PATCH] fix(docz-core): re-sync .docz on build --- core/docz-core/src/commands/build.ts | 12 ++++-------- core/docz-core/src/commands/init.ts | 7 ------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/core/docz-core/src/commands/build.ts b/core/docz-core/src/commands/build.ts index 90de598b8..76d19d887 100644 --- a/core/docz-core/src/commands/build.ts +++ b/core/docz-core/src/commands/build.ts @@ -3,7 +3,6 @@ import * as logger from 'signale' import { parseConfig } from '../config/docz' import { bundler as gatsby } from '../bundler' -import { getIsFirstInstall } from '../bundler/machine/actions' import { init } from './init' import { copyDoczRc } from '../bundler/machine/services/create-resources' @@ -11,14 +10,11 @@ export const build = async (args: Arguments) => { copyDoczRc(args.config) const config = await parseConfig(args) const bundler = gatsby(config) - const isFirstInstall = getIsFirstInstall() - if (isFirstInstall) { - try { - await init(args) - } catch (err) { - throw new Error(`Failed to initialize docz : ${err.message}`) - } + try { + await init(args) + } catch (err) { + logger.error(`Failed to initialize docz : ${err.message}`) } try { diff --git a/core/docz-core/src/commands/init.ts b/core/docz-core/src/commands/init.ts index 5487e8a28..9ed0b825f 100644 --- a/core/docz-core/src/commands/init.ts +++ b/core/docz-core/src/commands/init.ts @@ -23,11 +23,4 @@ export const init = async (args: Arguments) => { doczrcFilepath, } await createResources(serverMachineContext) - console.log() - console.log(`✅ Docz is ready to go `) - console.log() - console.log(`💻 yarn docz dev`) - console.log(`⛏ yarn docz build`) - console.log(`👀 yarn docz serve`) - console.log() }