Commit 67879697 authored by nanahira's avatar nanahira

bump and dev server

parent 50243a36
......@@ -8,3 +8,12 @@
Dockerfile
/src
/dist/full
/coverage
/tests
/dist/tests
/dev
/dist/dev
/webpack.config.js
/.eslint*
.*ignore
.prettierrc*
import { Context } from 'koishi';
export default class ExtrasInDev {
constructor(ctx: Context) {}
}
import { App } from 'koishi';
import TargetPlugin from '../src';
import ConsolePlugin from '@koishijs/plugin-console';
import SandboxPlugin from '@koishijs/plugin-sandbox';
import DatabasePlugin from '@koishijs/plugin-database-memory';
import CachePlugin from '@koishijs/plugin-cache-lru';
import ExtrasInDev from './extras';
const app = new App({
port: 14514,
host: 'localhost',
prefix: '.',
});
// Console and sandbox
app.plugin(SandboxPlugin);
app.plugin(ConsolePlugin, {
open: false,
});
// Some services
app.plugin(CachePlugin);
app.plugin(DatabasePlugin);
// Some extras
app.plugin(ExtrasInDev);
// Target plugin
app.plugin(TargetPlugin, {});
app.start();
This diff is collapsed.
......@@ -7,7 +7,8 @@
"scripts": {
"lint": "eslint --fix .",
"build": "webpack",
"test": "jest --passWithNoTests"
"test": "jest --passWithNoTests",
"start": "ts-node ./dev"
},
"repository": {
"type": "git",
......@@ -31,13 +32,17 @@
},
"homepage": "https://code.mycard.moe/3rdeye/koishi-plugin-typeorm",
"dependencies": {
"koishi-thirdeye": "^8.3.2",
"koishi-thirdeye": "^8.3.3",
"mysql": "^2.18.1",
"pg": "^8.7.3",
"source-map-support": "^0.5.21",
"typeorm": "^0.2.42-dev.1446e02"
},
"devDependencies": {
"@koishijs/plugin-cache-lru": "^1.0.0-rc.0",
"@koishijs/plugin-console": "^3.1.1",
"@koishijs/plugin-database-memory": "^1.0.2",
"@koishijs/plugin-sandbox": "^1.0.0",
"@types/jest": "^27.4.0",
"@types/node": "^17.0.16",
"@typescript-eslint/eslint-plugin": "^4.33.0",
......@@ -50,6 +55,7 @@
"raw-loader": "^4.0.2",
"ts-jest": "^27.1.3",
"ts-loader": "^9.2.6",
"ts-node": "^10.5.0",
"typescript": "^4.5.5",
"webpack": "^5.68.0",
"webpack-cli": "^4.9.2",
......@@ -73,6 +79,6 @@
"testEnvironment": "node"
},
"peerDependencies": {
"koishi": "^4.2.1"
"koishi": "^4.2.2"
}
}
import { App } from 'koishi';
import TargetPlugin from '../src';
describe('Test of plugin.', () => {
let app: App;
beforeEach(async () => {
app = new App();
// app.plugin(TargetPlugin);
await app.start();
});
it('should pass', () => {
expect(true).toBe(true);
});
});
......@@ -15,6 +15,7 @@
"include": [
"*.ts",
"src/**/*.ts",
"tests/**/*.ts"
"tests/**/*.ts",
"dev/**/*.ts"
]
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment