plugin: Add basic loading test
Will work on testing overlay next.
This commit is contained in:
23
test/test-plugin/src/index.ts
Normal file
23
test/test-plugin/src/index.ts
Normal file
@ -0,0 +1,23 @@
|
||||
import * as pluginapi from "../../../typings/plugin"
|
||||
import * as express from "express"
|
||||
import * as path from "path";
|
||||
|
||||
export function init(config: pluginapi.PluginConfig) {
|
||||
config.logger.debug("test-plugin loaded!")
|
||||
}
|
||||
|
||||
export function router(): express.Router {
|
||||
const r = express.Router()
|
||||
r.get("/goland/icon.svg", (req, res) => {
|
||||
res.sendFile(path.resolve(__dirname, "../public/icon.svg"))
|
||||
})
|
||||
return r
|
||||
}
|
||||
|
||||
export function applications(): pluginapi.Application[] {
|
||||
return [{
|
||||
name: "goland",
|
||||
version: "4.0.0",
|
||||
iconPath: "icon.svg",
|
||||
}]
|
||||
}
|
Reference in New Issue
Block a user