ferron

Ferron is a fast and simple static website generator made with Lua.
Log | Files | Refs | Submodules | README | LICENSE

commit 1c44b3c91d944c909ed88dbac02a16fdd784d4b2
parent 1f43a7829711f06700643c0e431581225400b40e
Author: Hugo Soucy <hugo@soucy.cc>
Date:   Tue, 18 Dec 2018 20:42:42 -0500

Rename local functions

Diffstat:
Mferron/static.lua | 10++++------
1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/ferron/static.lua b/ferron/static.lua @@ -9,23 +9,21 @@ local site = require "ferron.site" local static = {} -local function dispatch(file) +local function dispatchnontextual(file) return os.execute("cp -p " .. file .. " " .. site.paths.html) end -local function move() +local function movestaticfolder() return os.execute("cp -Rp " .. site.paths.static .. "/*" .. " " .. site.paths.html) end function static.init() local contentpath = assert(fileutils.isDirectory(site.paths.content)) - tableutils.each(dispatch, tableutils.filter(fileutils.isNonTextual, tableutils.settable(fileutils.getdirtree(contentpath)))) - move() - print("¤¤ Your site is ready at `" .. site.paths.html .. "` ¤¤") - return + return movestaticfolder(), + tableutils.each(dispatchnontextual, tableutils.filter(fileutils.isNonTextual, tableutils.settable(fileutils.getdirtree(contentpath)))) end return static