refactor: rename build to compile and watch to toggle in public API
Problem: the code used build/watch while the help file already documented compile/toggle, creating a confusing mismatch. Solution: rename M.build() to M.compile() and M.watch() to M.toggle() in init.lua, update handler keys in commands.lua, and update the test file to match.
This commit is contained in:
parent
4732696a62
commit
7a7c407d97
3 changed files with 12 additions and 12 deletions
|
|
@ -1,8 +1,8 @@
|
|||
local M = {}
|
||||
|
||||
local handlers = {
|
||||
build = function()
|
||||
require('preview').build()
|
||||
compile = function()
|
||||
require('preview').compile()
|
||||
end,
|
||||
stop = function()
|
||||
require('preview').stop()
|
||||
|
|
@ -10,8 +10,8 @@ local handlers = {
|
|||
clean = function()
|
||||
require('preview').clean()
|
||||
end,
|
||||
watch = function()
|
||||
require('preview').watch()
|
||||
toggle = function()
|
||||
require('preview').toggle()
|
||||
end,
|
||||
open = function()
|
||||
require('preview').open()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue