Skip to content

Commit

Permalink
🐛 Ensure dir and copy contents
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Oct 28, 2020
1 parent c20e8f9 commit 5d5a58b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/site.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -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();

0 comments on commit 5d5a58b

Please sign in to comment.