From 5d5a58be4f70593fef916d2fa525b233210481f7 Mon Sep 17 00:00:00 2001 From: Anand Chowdhary Date: Wed, 28 Oct 2020 17:40:30 +0530 Subject: [PATCH] :bug: Ensure dir and copy contents --- src/site.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/site.ts b/src/site.ts index d41780ec..485732f3 100644 --- a/src/site.ts +++ b/src/site.ts @@ -1,4 +1,4 @@ -import { cd, cp, exec, mkdir, mv } from "shelljs"; +import { cd, cp, exec, mkdir } from "shelljs"; export const generateSite = async () => { const siteDir = "site"; @@ -9,7 +9,8 @@ export const generateSite = async () => { cp("-r", "node_modules/@upptime/status-page/*", "."); exec("npm i"); exec("npm run export"); - mkdir("status-page"); - mv("__sapper__/export", "status-page/__sapper__/export"); + mkdir("-p", "status-page/__sapper__/export"); + cp("-r", "__sapper__/export/*", "status-page/__sapper__/export"); cd("../.."); }; +generateSite();