implementing routing and streamline tsx runtime
This commit is contained in:
parent
3d733cfe0b
commit
4af7b21171
14 changed files with 820 additions and 451 deletions
|
|
@ -14,16 +14,18 @@ const copyrightHeader = `/**
|
|||
|
||||
const dir = "./";
|
||||
|
||||
for await (const entry of walk(dir, {
|
||||
exts: [".ts", ".tsx"],
|
||||
includeDirs: false,
|
||||
skip: [/node_modules/, /copyright\.ts$/],
|
||||
})) {
|
||||
const filePath = entry.path;
|
||||
const content = await Deno.readTextFile(filePath);
|
||||
for await (
|
||||
const entry of walk(dir, {
|
||||
exts: [".ts", ".tsx"],
|
||||
includeDirs: false,
|
||||
skip: [/node_modules/, /copyright\.ts$/],
|
||||
})
|
||||
) {
|
||||
const filePath = entry.path;
|
||||
const content = await Deno.readTextFile(filePath);
|
||||
|
||||
if (!content.startsWith(copyrightHeader)) {
|
||||
await Deno.writeTextFile(filePath, copyrightHeader + "\n" + content);
|
||||
console.log(`Added header to ${filePath}`);
|
||||
}
|
||||
if (!content.startsWith(copyrightHeader)) {
|
||||
await Deno.writeTextFile(filePath, copyrightHeader + "\n" + content);
|
||||
console.log(`Added header to ${filePath}`);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue