Compiler test

This commit is contained in:
The Arcane Brony
2021-10-06 18:20:22 +02:00
parent d99e5c565a
commit 7db9086dd0
29 changed files with 153 additions and 14 deletions
+23
View File
@@ -0,0 +1,23 @@
{
"jsc": {
"parser": {
"syntax": "ecmascript",
"jsx": false,
"dynamicImport": false,
"privateMethod": false,
"functionBind": false,
"exportDefaultFrom": false,
"exportNamespaceFrom": false,
"decorators": false,
"decoratorsBeforeExport": false,
"topLevelAwait": false,
"importMeta": false
},
"transform": null,
"target": "es2021",
"loose": false,
"externalHelpers": false,
// Requires v1.2.50 or upper and requires target to be es2016 or upper.
"keepClassNames": false
}
}
BIN
View File
Binary file not shown.
+4 -1
View File
@@ -7,7 +7,7 @@
"setup": "cd ../util && npm --production=false i && cd ../api && npm --production=false i && cd ../cdn && npm --production=false i && cd ../gateway && npm --production=false i && cd ../bundle/ && npm --production=false i && npm run build",
"build": "npm run build:util && npm run build:api && npm run build:cdn && npm run build:gateway && npm run build:bundle",
"postinstall": "ts-patch install -s",
"build:bundle": "npx tsc -b .",
"build:bundle": "swc src --out-dir dist",
"build:util": "cd ../util/ && npm run build",
"build:api": "cd ../api/ && npm run build",
"build:cdn": "cd ../cdn/ && npm run build",
@@ -28,6 +28,8 @@
},
"homepage": "https://fosscord.com",
"devDependencies": {
"@swc/cli": "^0.1.51",
"@swc/core": "^1.2.93",
"@types/amqplib": "^0.8.1",
"@types/async-exit-hook": "^2.0.0",
"@types/bcrypt": "^5.0.0",
@@ -59,6 +61,7 @@
"missing-native-js-functions": "^1.2.17",
"nanocolors": "^0.2.12",
"node-os-utils": "^1.3.5",
"swc": "^1.0.11",
"tsconfig-paths": "^3.11.0"
}
}
+18
View File
@@ -0,0 +1,18 @@
const { exec, spawn } = require("child_process");
const { exitCode } = require("process");
let parts = "api,cdn,gateway,util,bundle".split(",");
parts.forEach(element => {
// exec(`npm --prefix ../${element} run build`, (error, stdout, stderr) => {
// if (error) {
// console.log(`error: ${error.message}`);
// return;
// }
// if (stderr) {
// console.log(`stderr: ${stderr}`);
// return;
// }
// console.log(`stdout: ${stdout}`);
// });
spawn("npm", ["run", "build"], {cwd: `../${element}`});
});
+2 -2
View File
@@ -4,10 +4,10 @@
/* Visit https://aka.ms/tsconfig.json to read more about this file */
/* Basic Options */
// "incremental": true, /* Enable incremental compilation */
"incremental": true, /* Enable incremental compilation */
"target": "ESNext" /* 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": ["ES2020"] /* 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'. */
+1
View File
@@ -0,0 +1 @@
{"version":"4.4.3"}