|
@@ -11,6 +11,10 @@ function printDirectoryContent(directoryPath, indent = '') {
|
|
|
const files = fs.readdirSync(directoryPath);
|
|
const files = fs.readdirSync(directoryPath);
|
|
|
|
|
|
|
|
for (const file of files) {
|
|
for (const file of files) {
|
|
|
|
|
+ // Should exclude markdown files
|
|
|
|
|
+ if (file.endsWith('.md')) {
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
const filePath = path.join(directoryPath, file);
|
|
const filePath = path.join(directoryPath, file);
|
|
|
const stats = fs.statSync(filePath);
|
|
const stats = fs.statSync(filePath);
|
|
|
|
|
|
|
@@ -22,7 +26,7 @@ function printDirectoryContent(directoryPath, indent = '') {
|
|
|
const fileExtension = path.extname(filePath).toLowerCase();
|
|
const fileExtension = path.extname(filePath).toLowerCase();
|
|
|
const language = getLanguageFromExtension(fileExtension);
|
|
const language = getLanguageFromExtension(fileExtension);
|
|
|
|
|
|
|
|
- console.log(indent + '**' + file + '**');
|
|
|
|
|
|
|
+ console.log(indent + '**' + file + '**\n');
|
|
|
console.log('```' + language);
|
|
console.log('```' + language);
|
|
|
console.log(fileContent);
|
|
console.log(fileContent);
|
|
|
console.log('```');
|
|
console.log('```');
|