From dea300ffa93d41413f9cf3c875cde983ac52674c Mon Sep 17 00:00:00 2001 From: Xeltica Date: Mon, 18 Oct 2021 01:32:33 +0900 Subject: [PATCH] =?UTF-8?q?version=E3=81=8C=E6=B8=A1=E3=81=A3=E3=81=A6?= =?UTF-8?q?=E3=81=84=E3=81=AA=E3=81=8B=E3=81=A3=E3=81=9F=E3=83=90=E3=82=B0?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/render.ts | 2 ++ tsconfig.json | 24 ++++++++++++------------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/backend/render.ts b/src/backend/render.ts index d0674b8..80e7c8d 100644 --- a/src/backend/render.ts +++ b/src/backend/render.ts @@ -1,5 +1,7 @@ import views from 'koa-views'; +import { version } from '../../package.json'; export const render = views(__dirname + '/views', { extension: 'pug', + options: { version }, }); diff --git a/tsconfig.json b/tsconfig.json index 01e2a16..0843dd3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,20 +1,20 @@ { "compilerOptions": { - "target": "es5", /* 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'. */ - "outDir": "./built/", /* Redirect output structure to the directory. */ - "rootDir": "./src/", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - "strict": true, /* Enable all strict type-checking options. */ - "strictPropertyInitialization": false, /* Enable strict checking of property initialization in classes. */ + "target": "es5", + "module": "commonjs", + "outDir": "./built/", + "strict": true, + "strictPropertyInitialization": false, "typeRoots": [ "node_modules/@types", "src/@types" - ], /* List of folders to include type definitions from. */ - "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - "skipLibCheck": true, /* Skip type checking of declaration files. */ - "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ + ], + "esModuleInterop": true, + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true }, "exclude": [ "./migration",