Skip to content

Commit

Permalink
Removed unneeded test.
Browse files Browse the repository at this point in the history
  • Loading branch information
drorm committed Apr 26, 2023
1 parent 7f5529f commit 214a2d4
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions src/generateFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,35 +35,3 @@ function isValidFileName(fileName: string): boolean {
/^(?!^\.$)(?!^\.{2}$)^(?=.{1,254}$)(?:(?!\. |^ | $| | \\. | .{255,}| [.-]$)[a-zA-Z0-9 ._-])*([a-zA-Z0-9_/.-])*(?<! -)$/;
return validFileNameRegex.test(fileName);
}
// Test example: Call the function with the given text input
const text = `
\`\`\`src/index.html
<html>
<head>
<title>Hello World</title>
</head>
<body>
<h1>Hello World!</h1>
<script src="app.js"></script>
</body>
</html>
\`\`\`
\`\`\`src/style.css
body {
text-align: center;
}
\`\`\`
\`\`\`src/app.js
console.log("Hello World!");
\`\`\`
\`\`\`README.md
# Hello World
This is a simple web app that prints "Hello World!" to the console.
To run it simply run:
\`\`\`
node app.js
\`\`\`
And that's all.
\`\`\`
`;
generateFiles(text, "./output"); // <--- output directory

0 comments on commit 214a2d4

Please sign in to comment.