-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Grzegorz Tańczyk
committed
Jul 13, 2024
1 parent
4aa19d2
commit ec92c14
Showing
5 changed files
with
18 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
import fs from 'fs'; | ||
|
||
import { sourceFiles } from './find-files.js'; | ||
import { getSourceFiles } from './find-files.js'; | ||
|
||
/** | ||
* Read contents of source files and create a map with file path as key and file content as value | ||
*/ | ||
function readSourceFiles() { | ||
const sourceCode = {}; | ||
for (const file of sourceFiles) { | ||
for (const file of getSourceFiles()) { | ||
sourceCode[file] = fs.readFileSync(file, 'utf-8'); | ||
} | ||
return sourceCode; | ||
} | ||
|
||
export const sourceCode = readSourceFiles(); | ||
/** Print source code of all source files */ | ||
export function getSourceCode() { | ||
return readSourceFiles(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters