refactor of public plugin's api (#37)

* refactor: move all plugin functionality to init.lua

* fix(commands): now it uses correct module paths

* refactor(config): change way how it handles options

* refactor(gotests): use correct config, change way how deps required, fix some typos

* fix(healthchecker): use correct config

* refactor(iferr): change api

* refactor(impl): change api

* refactor(installer): change api

* refactor(struct_tags): change way of importting deps

* refactor(struct_tags): rename M to struct_tags

* run stylua

* refactor(dap): make it all in one file, and make some refactoring

* refactor(_utils): change way how it organizes

* fix: use new _utils api

* refactor(_utils.health): reorganize module

* refactor(_utils.ts): some renameing, moving requires lines

* run stylua
This commit is contained in:
Smirnov Oleksandr 2023-07-19 23:38:23 +03:00 committed by GitHub
parent 94250bb08a
commit 26b41bf68c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 359 additions and 341 deletions

View file

@ -1,5 +1,35 @@
local GOPHER = {}
local tags = require "gopher.struct_tags"
local tests = require "gopher.gotests"
local uc = require "gopher._utils.commands"
local gopher = {}
GOPHER.setup = require("gopher.config").setup
gopher.setup = require("gopher.config").setup
gopher.install_deps = require("gopher.installer").install_deps
gopher.impl = require("gopher.impl").impl
gopher.iferr = require("gopher.iferr").iferr
gopher.comment = require "gopher.comment"
return GOPHER
gopher.tags_add = tags.add
gopher.tags_rm = tags.remove
gopher.test_add = tests.func_test
gopher.test_exported = tests.all_exported_tests
gopher.tests_all = tests.all_tests
gopher.get = function(...)
uc("get", ...)
end
gopher.mod = function(...)
uc("mod", ...)
end
gopher.generate = function(...)
uc("generate", ...)
end
gopher.work = function(...)
uc("work", ...)
end
return gopher