refactor(build): gulpを経由しないでTypeScriptのビルドを行うように

path aliasをサーバーサイドでも使ったりしたいため
This commit is contained in:
syuilo 2021-03-23 17:24:40 +09:00
parent 94fd5485b6
commit 8432c2c9ea
9 changed files with 106 additions and 50 deletions

View file

@ -1,3 +0,0 @@
declare module '*/meta.json' {
const version: string;
}

View file

@ -12,7 +12,7 @@ import { lessThan } from '../prelude/array';
import { program } from '../argv';
import { showMachineInfo } from '../misc/show-machine-info';
import { initDb } from '../db/postgre';
import * as meta from '../meta.json';
const meta = require('../meta.json');
const logger = new Logger('core', 'cyan');
const bootLogger = logger.createSubLogger('boot', 'magenta', false);

View file

@ -5,7 +5,7 @@
import * as fs from 'fs';
import * as yaml from 'js-yaml';
import { Source, Mixin } from './types';
import * as meta from '../meta.json';
const meta = require('../meta.json');
/**
* Path of configuration directory

View file

@ -0,0 +1,28 @@
{
"short_name": "Misskey",
"name": "Misskey",
"start_url": "/",
"display": "standalone",
"background_color": "#313a42",
"theme_color": "#86b300",
"icons": [
{
"src": "/static-assets/icons/192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/static-assets/icons/512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"share_target": {
"action": "/share/",
"params": {
"title": "title",
"text": "text",
"url": "url"
}
}
}

View file

@ -1,5 +1,5 @@
import * as Koa from 'koa';
import * as manifest from '../../../assets/client/manifest.json';
import * as manifest from './manifest.json';
import { fetchMeta } from '../../misc/fetch-meta';
module.exports = async (ctx: Koa.Context) => {

View file

@ -21,6 +21,9 @@
"emitDecoratorMetadata": true,
"resolveJsonModule": true,
"isolatedModules": true,
"rootDir": "./",
"baseUrl": "./",
"outDir": "../built",
"typeRoots": [
"../node_modules/@types",
"./@types"