From ee050cc37edbaa9b3eba03fa6403cd9ed05811d7 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 4 Aug 2018 10:40:09 +0900 Subject: [PATCH] :v: --- .gitignore | 1 + package.json | 2 -- src/games/reversi/package.json | 18 ++++++++++++++++++ src/games/reversi/tsconfig.json | 21 +++++++++++++++++++++ src/mfm/html.ts | 2 +- 5 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 src/games/reversi/package.json create mode 100644 src/games/reversi/tsconfig.json diff --git a/.gitignore b/.gitignore index 51e6a31b7..2cea822c1 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ /node_modules /build /built +built /data /.cache-loader npm-debug.log diff --git a/package.json b/package.json index ba5eab2fb..8eff18b09 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,6 @@ "@types/is-root": "1.0.0", "@types/is-url": "1.2.28", "@types/js-yaml": "3.11.2", - "@types/jsdom": "11.0.6", "@types/koa": "2.0.46", "@types/koa-bodyparser": "5.0.1", "@types/koa-compress": "2.0.8", @@ -61,7 +60,6 @@ "@types/mongodb": "3.1.3", "@types/ms": "0.7.30", "@types/node": "10.5.5", - "@types/parse5": "5.0.0", "@types/portscanner": "2.1.0", "@types/pug": "2.0.4", "@types/qrcode": "1.2.0", diff --git a/src/games/reversi/package.json b/src/games/reversi/package.json new file mode 100644 index 000000000..5e7fdcb58 --- /dev/null +++ b/src/games/reversi/package.json @@ -0,0 +1,18 @@ +{ + "name": "misskey-reversi", + "version": "0.0.5", + "description": "Misskey reversi engine", + "keywords": [ + "misskey" + ], + "author": "syuilo ", + "license": "MIT", + "repository": "https://github.com/syuilo/misskey.git", + "bugs": "https://github.com/syuilo/misskey/issues", + "main": "./built/core.js", + "types": "./built/core.d.ts", + "scripts": { + "build": "tsc" + }, + "dependencies": {} +} diff --git a/src/games/reversi/tsconfig.json b/src/games/reversi/tsconfig.json new file mode 100644 index 000000000..851fb6b7e --- /dev/null +++ b/src/games/reversi/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "noEmitOnError": false, + "noImplicitAny": false, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "experimentalDecorators": true, + "declaration": true, + "sourceMap": false, + "target": "es2017", + "module": "commonjs", + "removeComments": false, + "noLib": false, + "outDir": "./built", + "rootDir": "./" + }, + "compileOnSave": false, + "include": [ + "./core.ts" + ] +} diff --git a/src/mfm/html.ts b/src/mfm/html.ts index eeaa4d813..c047043cb 100644 --- a/src/mfm/html.ts +++ b/src/mfm/html.ts @@ -1,5 +1,5 @@ const { lib: emojilib } = require('emojilib'); -import { JSDOM } from 'jsdom'; +const JSDOM = require('jsdom'); import config from '../config'; import { INote } from '../models/note'; import { TextElement } from './parse';