Skip to content

Commit

Permalink
refactor: remove main.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
chenasraf committed May 5, 2024
1 parent d25f584 commit fb6bb28
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 20 deletions.
15 changes: 13 additions & 2 deletions lua/text-transform/init.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
local M = require("text-transform.main")
local utils = require("text-transform.utils")
local tt = require("text-transform.transformers")
local replacers = require("text-transform.replacers")
local state = require("text-transform.state")
local popup = require("text-transform.popup")

local TextTransform = {}

function TextTransform.setup(opts)
_G.TextTransform.config = require("text-transform.config").setup(opts)
end

_G.TextTransform = utils.merge(M, TextTransform)
local function merge(table)
TextTransform = utils.merge(TextTransform, table)
end

merge(tt)
merge(replacers)
merge(state)
merge(popup)

_G.TextTransform = TextTransform
return _G.TextTransform
18 changes: 0 additions & 18 deletions lua/text-transform/main.lua

This file was deleted.

0 comments on commit fb6bb28

Please sign in to comment.