瀏覽代碼

gluon-core: add util gluon-show-site to print merged site config

This should not convert JSON to a Lua table and back, as this loses the
distinction between arrays and objects, but as our site.conf is defined in
Lua anyways (for now), this can be fixed in a later revision.

[Matthias Schiffer: rename to gluon-show-site, rebase]
lemoer 6 年之前
父節點
當前提交
0f5d932c4f
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      package/gluon-core/luasrc/usr/bin/gluon-show-site

+ 6 - 0
package/gluon-core/luasrc/usr/bin/gluon-show-site

@@ -0,0 +1,6 @@
+#!/usr/bin/lua
+
+local json = require 'jsonc'
+local site = require 'gluon.site'
+
+print(json.stringify(site(), true))