From 4f100126ed3475d01869f4ddcb046a0760e7fd65 Mon Sep 17 00:00:00 2001 From: AiverAiva <43096905+AiverAiva@users.noreply.github.com> Date: Wed, 25 Oct 2023 22:47:08 +0800 Subject: [PATCH] docs: update readme of detailed information --- README.md | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 40a39cb..7ad01d2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,35 @@ # cdn + A file tree system made with very easy mechanic. Using Github Actions for updating. +I made this due to the scarcity of these kind of resources we are able to find on the internet, there are prob some exist libraries that I didnt found. +But anyways it took me a few minutes to make this simple script, which fits all my requirements I need and it is pretty need + +# Explaination + +This function basically creates the required html code for the website to work +It recursively searchs files in `src/` +and making its path for the later using of turning the paths into code +Thats what this function does. + +```js +function generateFileTree(dir) { + const files = fs.readdirSync(dir); + + let fileTree = ''; + return fileTree; +} +```