Fixed #57.
h3rald h3rald@h3rald.com
Mon, 30 Nov 2020 17:07:22 +0100
4 files changed,
67 insertions(+),
64 deletions(-)
M
build_guide
→
build_guide
@@ -30,7 +30,7 @@ for page in ${pages[@]}
do (cat "${page}"; printf "\n\n") >> LiteStore_UserGuide.md done -hastyscribe --field/version:1.9.2 LiteStore_UserGuide.md +hastyscribe --field/version:1.9.3 LiteStore_UserGuide.md rm LiteStore_UserGuide.md mv LiteStore_UserGuide.htm .. cd ../..
M
litestore.nimble
→
litestore.nimble
@@ -31,7 +31,7 @@ # Build
const parallel = "" #"--parallelBuild:1 --verbosity:3" - compile = "nim c -d:release" & " " & parallel + compile = "nim c -d:release --opt:size " & parallel linux_x64 = "--cpu:amd64 --os:linux --passL:-static" windows_x64 = "--cpu:amd64 --os:windows" macosx_x64 = ""
M
src/admin/js/components/editor.js
→
src/admin/js/components/editor.js
@@ -1,65 +1,68 @@
-(function(){ - 'use strict'; - var app = window.LS || (window.LS = {}); - app.editor = {}; +(function () { + "use strict"; + var app = window.LS || (window.LS = {}); + app.editor = {}; - app.editor.config = function(obj){ - return function(element, isInitialized, context){ - var e = element; - if (!isInitialized) { - var editor = ace.edit(e); - obj.editor = editor; - e.style.position = "relative"; - editor.updateMode = function(filename) { - var self = this; - var ext = ""; - try { - ext = filename.match(/\.([a-z0-9]+)$/)[1]; - } catch(e) { - ext = ""; - } - switch (ext){ - case 'js': - obj.mode = "javascript"; - break; - case 'css': - obj.mode = "css"; - break; - case 'html': - obj.mode = "html"; - break; - case 'json': - obj.mode = "json"; - break; - case 'md': - obj.mode = "markdown"; - break; - default: - obj.mode = "text"; - } - self.getSession().setMode("ace/mode/"+obj.mode); + app.editor.config = function (obj) { + return function (element, isInitialized, context) { + var e = element; + if (!isInitialized) { + var editor = ace.edit(e); + obj.editor = editor; + e.style.position = "relative"; + editor.updateMode = function (filename) { + var self = this; + var ext = ""; + try { + ext = filename.match(/\.([a-z0-9]+)$/)[1]; + } catch (e) { + ext = ""; + } + switch (ext) { + case "js": + obj.mode = "javascript"; + break; + case "css": + obj.mode = "css"; + break; + case "html": + obj.mode = "html"; + break; + case "json": + obj.mode = "json"; + break; + case "md": + obj.mode = "markdown"; + break; + default: + obj.mode = "text"; + } + self.getSession().setMode("ace/mode/" + obj.mode); + }; + editor.setOptions({ maxLines: Infinity }); + editor.setReadOnly(obj.readOnly); + editor.setShowPrintMargin(false); + editor.setTheme("ace/theme/github"); + editor.updateMode(obj.id()); + editor.getSession().setUseWrapMode(true); + editor.getSession().setTabSize(2); + } }; - editor.setOptions({ maxLines: Infinity }); - editor.setReadOnly(obj.readOnly); - editor.setShowPrintMargin(false); - editor.setTheme("ace/theme/github"); - editor.updateMode(obj.id()); - editor.getSession().setUseWrapMode(true); - editor.getSession().setTabSize(2); - } }; - }; - /** - * @param {Function} ctrl - * @param {Object} args - * @param {string} args.content - */ - app.editor.view = function(ctrl, args) { - if (args.ext === 'json'){ - args.content = JSON.stringify(args.content); - } - return m(".editor.panel.panal-default", {config: app.editor.config(args)}, args.content); - }; - -}()); + /** + * @param {Function} ctrl + * @param {Object} args + * @param {string} args.content + */ + app.editor.view = function (ctrl, args) { + if (!args.ext || args.ext === "json") { + args.content = args.content ? JSON.stringify(args.content) : ""; + } + return m( + ".editor.panel.panal-default", + { config: app.editor.config(args) }, + args.content + ); + }; +})();
M
src/litestorepkg/lib/config.nim
→
src/litestorepkg/lib/config.nim
@@ -1,6 +1,6 @@
const pkgName* = "litestore" - pkgVersion* = "1.9.2" + pkgVersion* = "1.9.3" pkgAuthor* = "Fabio Cevasco" pkgDescription* = "Self-contained, lightweight, RESTful document store." pkgLicense* = "MIT"