ferron

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

commit 73cba442d66e6c03eb359ded544a3539080b31de
parent f651c6c4fed3de22b2d93ea032e148f36723886c
Author: Hugo Soucy <hsoucy@kronostechnologies.com>
Date:   Wed, 28 Mar 2018 08:36:56 -0400

Add some commands to the CLI.

Diffstat:
Mcornelius | 13++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/cornelius b/cornelius @@ -3,4 +3,15 @@ -- Cornelius is the future CLI of Ferron SSG. -- <https://en.wikipedia.org/wiki/Cornelius_the_First> -print("Hi, I'm Cornelius!") +local config = require "config" + +if arg[1] == "install" then + for i, dependency in ipairs(config.dependencies) do + os.execute ("luarocks install --tree lua_modules " .. dependency) + end + +elseif arg[1] == "build" then + os.execute("lua -l set_paths ferron.lua") +elseif arg[1] == "build" and arg[2] == "--dev" then + os.execute("lua -l set_paths ferron.lua --dev") +end