From b31bd3dbabb57eda3fddfaa7a59e01e73442834f Mon Sep 17 00:00:00 2001 From: Bobby Date: Mon, 18 Jul 2022 00:57:36 +0530 Subject: Change Init to Ghost --- hooks/pre-commit.js | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 hooks/pre-commit.js (limited to 'hooks/pre-commit.js') diff --git a/hooks/pre-commit.js b/hooks/pre-commit.js deleted file mode 100644 index d917d59a..00000000 --- a/hooks/pre-commit.js +++ /dev/null @@ -1,18 +0,0 @@ -const fs = require("fs"); -const shell = require("shelljs"); - -// Open the readme file -const readme = fs.readFileSync("README.md", "utf8"); - -// Find the line which starts with "![Screenshot]" -const screenshotLine = readme.split("\n").find(line => line.startsWith("![Screenshot]")); - -// Replace the line with the new screenshot -const newScreenshotLine = `![Screenshot](https://api.thatcomputerscientist.com/screenshot?random=${Math.random()})`; -const newReadme = readme.replace(screenshotLine, newScreenshotLine); - -// Write the new readme file -fs.writeFileSync("README.md", newReadme); - -// Add the readme file to the git commit -shell.exec("git add README.md"); -- cgit v1.2.3