mirror of
https://github.com/spacebarchat/server.git
synced 2026-03-30 13:55:39 +00:00
Prettier a few files
This commit is contained in:
@@ -50,12 +50,12 @@ if (fs.existsSync(path.join(targetDir, "index.js")) || fs.existsSync(path.join(t
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const dirs = fs.readdirSync(targetDir).filter(f => fs.statSync(path.join(targetDir, f)).isDirectory());
|
||||
const dirs = fs.readdirSync(targetDir).filter((f) => fs.statSync(path.join(targetDir, f)).isDirectory());
|
||||
for (const dir of dirs) {
|
||||
content += `export * from "./${dir}";\n`;
|
||||
}
|
||||
|
||||
const files = fs.readdirSync(targetDir).filter(f => f.endsWith(".js") || f.endsWith(".ts"));
|
||||
const files = fs.readdirSync(targetDir).filter((f) => f.endsWith(".js") || f.endsWith(".ts"));
|
||||
for (const file of files) {
|
||||
const filePath = path.join(targetDir, file);
|
||||
const stat = fs.statSync(filePath);
|
||||
@@ -66,4 +66,4 @@ for (const file of files) {
|
||||
}
|
||||
}
|
||||
|
||||
fs.writeFileSync(path.join(targetDir, "index.ts"), content);
|
||||
fs.writeFileSync(path.join(targetDir, "index.ts"), content);
|
||||
|
||||
@@ -34,12 +34,7 @@ const addToDir = (dir) => {
|
||||
const commentStrings = languageCommentStrings[fileType];
|
||||
if (!commentStrings) continue;
|
||||
|
||||
const preamble =
|
||||
commentStrings[0] +
|
||||
"\n" +
|
||||
SPACEBAR_LICENSE_PREAMBLE +
|
||||
"\n" +
|
||||
commentStrings[1];
|
||||
const preamble = commentStrings[0] + "\n" + SPACEBAR_LICENSE_PREAMBLE + "\n" + commentStrings[1];
|
||||
|
||||
if (file.startsWith(preamble)) {
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user