feat: add plugins packages and add Test Plugin
Signed-off-by: MiaoWoo <admin@yumc.pw>clean
parent
6d7516e2d9
commit
cbe87cc378
|
@ -0,0 +1,4 @@
|
|||
/node_modules
|
||||
/dist
|
||||
/package-lock.json
|
||||
/yarn.lock
|
|
@ -0,0 +1,22 @@
|
|||
src
|
||||
test
|
||||
typings
|
||||
bundled
|
||||
build
|
||||
coverage
|
||||
docs
|
||||
wiki
|
||||
gulpfile.js
|
||||
bower.json
|
||||
karma.conf.js
|
||||
tsconfig.json
|
||||
typings.json
|
||||
CONTRIBUTING.md
|
||||
ISSUE_TEMPLATE.md
|
||||
PULL_REQUEST_TEMPLATE.md
|
||||
tslint.json
|
||||
wallaby.js
|
||||
.travis.yml
|
||||
.gitignore
|
||||
.vscode
|
||||
type_definitions
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
"name": "@ms/plugins",
|
||||
"version": "0.0.0",
|
||||
"description": "MiaoScript plugins package",
|
||||
"keywords": [
|
||||
"miaoscript",
|
||||
"minecraft",
|
||||
"bukkit",
|
||||
"sponge"
|
||||
],
|
||||
"author": "MiaoWoo <admin@yumc.pw>",
|
||||
"homepage": "https://github.com/circlecloud/ms.git",
|
||||
"license": "ISC",
|
||||
"main": "dist/index.js",
|
||||
"publishConfig": {
|
||||
"registry": "https://repo.yumc.pw/repository/npm/"
|
||||
},
|
||||
"scripts": {
|
||||
"clean": "rimraf dist",
|
||||
"watch": "npx tsc --watch",
|
||||
"build": "yarn clean && npx tsc",
|
||||
"test": "echo \"Error: run tests from root\" && exit 1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"reflect-metadata": "^0.1.13",
|
||||
"rimraf": "^3.0.0",
|
||||
"typescript": "^3.6.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ms/plugins": "^0.0.0",
|
||||
"es6-map": "^0.1.5",
|
||||
"inversify": "^5.0.1"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
import { plugin, interfaces } from '@ms/plugin'
|
||||
|
||||
@plugin({ name: 'Test', version: '1.0.0', author: 'MiaoWoo' })
|
||||
export class Test extends interfaces.Plugin {
|
||||
load() {
|
||||
this.logger.log('');
|
||||
}
|
||||
enable() {
|
||||
throw new Error("Method not implemented.");
|
||||
}
|
||||
disable() {
|
||||
throw new Error("Method not implemented.");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": "src",
|
||||
"outDir": "dist"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue