summary refs log tree commit diff
path: root/bundle
diff options
context:
space:
mode:
authordevelopomp <developomp@gmail.com>2021-10-20 09:11:12 +0900
committerdevelopomp <developomp@gmail.com>2021-10-20 09:11:12 +0900
commit53949bd7370d9865f2609f901071190be7d7021a (patch)
tree967fcaf89aaa89bf26201d98e53e90d57bbda6f6 /bundle
parentMerge branch 'fosscord:master' into master (diff)
downloadserver-53949bd7370d9865f2609f901071190be7d7021a.tar.xz
prettier formatted /bundle
Diffstat (limited to 'bundle')
-rw-r--r--bundle/.prettierrc4
-rw-r--r--bundle/scripts/build.js24
-rw-r--r--bundle/scripts/install.js13
-rw-r--r--bundle/tsconfig.json8
4 files changed, 41 insertions, 8 deletions
diff --git a/bundle/.prettierrc b/bundle/.prettierrc
new file mode 100644
index 00000000..6a48eb4a
--- /dev/null
+++ b/bundle/.prettierrc
@@ -0,0 +1,4 @@
+{
+	"useTabs": true,
+	"tabWidth": 4
+}
diff --git a/bundle/scripts/build.js b/bundle/scripts/build.js
index dbc305a9..ad00d47f 100644
--- a/bundle/scripts/build.js
+++ b/bundle/scripts/build.js
@@ -18,15 +18,24 @@ if (argv.includes("clean")) {
 	});
 }
 
-fse.copySync(path.join(__dirname, "..", "..", "api", "assets"), path.join(__dirname, "..", "dist", "api", "assets"));
+fse.copySync(
+	path.join(__dirname, "..", "..", "api", "assets"),
+	path.join(__dirname, "..", "dist", "api", "assets")
+);
 fse.copySync(
 	path.join(__dirname, "..", "..", "api", "client_test"),
 	path.join(__dirname, "..", "dist", "api", "client_test")
 );
-fse.copySync(path.join(__dirname, "..", "..", "api", "locales"), path.join(__dirname, "..", "dist", "api", "locales"));
+fse.copySync(
+	path.join(__dirname, "..", "..", "api", "locales"),
+	path.join(__dirname, "..", "dist", "api", "locales")
+);
 dirs.forEach((a) => {
 	fse.copySync("../" + a + "/src", "dist/" + a + "/src");
-	if (verbose) console.log(`Copied ${"../" + a + "/dist"} -> ${"dist/" + a + "/src"}!`);
+	if (verbose)
+		console.log(
+			`Copied ${"../" + a + "/dist"} -> ${"dist/" + a + "/src"}!`
+		);
 });
 
 console.log("Copying src files done");
@@ -35,7 +44,14 @@ console.log("Compiling src files ...");
 console.log(
 	execSync(
 		'node "' +
-			path.join(__dirname, "..", "node_modules", "typescript", "lib", "tsc.js") +
+			path.join(
+				__dirname,
+				"..",
+				"node_modules",
+				"typescript",
+				"lib",
+				"tsc.js"
+			) +
 			'" -p "' +
 			path.join(__dirname, "..") +
 			'"',
diff --git a/bundle/scripts/install.js b/bundle/scripts/install.js
index 3008b4c5..db9dadbc 100644
--- a/bundle/scripts/install.js
+++ b/bundle/scripts/install.js
@@ -5,10 +5,19 @@ const parts = ["api", "util", "cdn", "gateway"];
 const bundle = require("../package.json");
 
 for (const part of parts) {
-	const { devDependencies, dependencies } = require(path.join("..", "..", part, "package.json"));
+	const { devDependencies, dependencies } = require(path.join(
+		"..",
+		"..",
+		part,
+		"package.json"
+	));
 	bundle.devDependencies = { ...bundle.devDependencies, ...devDependencies };
 	bundle.dependencies = { ...bundle.dependencies, ...dependencies };
 	delete bundle.dependencies["@fosscord/util"];
 }
 
-fs.writeFileSync(path.join(__dirname, "..", "package.json"), JSON.stringify(bundle, null, "\t"), { encoding: "utf8" });
+fs.writeFileSync(
+	path.join(__dirname, "..", "package.json"),
+	JSON.stringify(bundle, null, "\t"),
+	{ encoding: "utf8" }
+);
diff --git a/bundle/tsconfig.json b/bundle/tsconfig.json
index 4e8db342..58c61132 100644
--- a/bundle/tsconfig.json
+++ b/bundle/tsconfig.json
@@ -8,7 +8,9 @@
 		"incremental": false /* Enable incremental compilation */,
 		"target": "ES6" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */,
 		"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */,
-		"lib": ["ES2021"] /* Specify library files to be included in the compilation. */,
+		"lib": [
+			"ES2021"
+		] /* Specify library files to be included in the compilation. */,
 		"allowJs": true /* Allow javascript files to be compiled. */,
 		"checkJs": true /* Report errors in .js files. */,
 		// "jsx": "preserve",                     /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
@@ -46,7 +48,9 @@
 		// "moduleResolution": "node",            /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
 		// "rootDirs": [],                        /* List of root folders whose combined content represents the structure of the project at runtime. */
 		// "typeRoots": [],                       /* List of folders to include type definitions from. */
-		"types": ["node"] /* Type declaration files to be included in compilation. */,
+		"types": [
+			"node"
+		] /* Type declaration files to be included in compilation. */,
 		// "allowSyntheticDefaultImports": true,  /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
 		"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
 		// "preserveSymlinks": true,              /* Do not resolve the real path of symlinks. */