2020-10-30 15:18:59 +08:00
|
|
|
import * as express from "express"
|
2020-10-30 15:26:30 +08:00
|
|
|
import * as path from "path"
|
|
|
|
import * as pluginapi from "../../../typings/plugin"
|
2020-10-30 15:18:59 +08:00
|
|
|
|
|
|
|
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[] {
|
2020-10-30 15:26:30 +08:00
|
|
|
return [
|
|
|
|
{
|
|
|
|
name: "goland",
|
|
|
|
version: "4.0.0",
|
|
|
|
iconPath: "icon.svg",
|
|
|
|
},
|
|
|
|
]
|
2020-10-30 15:18:59 +08:00
|
|
|
}
|