bajo-template 2.0.1 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/FUNDING.yml +0 -0
- package/.github/workflows/repo-lockdown.yml +0 -0
- package/.jsdoc.conf.json +0 -0
- package/LICENSE +0 -0
- package/README.md +0 -0
- package/docs/BajoTemplate.html +0 -0
- package/docs/data/search.json +0 -0
- package/docs/fonts/Inconsolata-Regular.ttf +0 -0
- package/docs/fonts/OpenSans-Regular.ttf +0 -0
- package/docs/fonts/WorkSans-Bold.ttf +0 -0
- package/docs/global.html +0 -0
- package/docs/index.html +0 -0
- package/docs/index.js.html +0 -0
- package/docs/scripts/core.js +476 -477
- package/docs/scripts/core.min.js +0 -0
- package/docs/scripts/resize.js +36 -36
- package/docs/scripts/search.js +105 -105
- package/docs/scripts/search.min.js +0 -0
- package/docs/scripts/third-party/Apache-License-2.0.txt +0 -0
- package/docs/scripts/third-party/fuse.js +1 -1
- package/docs/scripts/third-party/hljs-line-num-original.js +282 -285
- package/docs/scripts/third-party/hljs-line-num.js +1 -1
- package/docs/scripts/third-party/hljs-original.js +1195 -1202
- package/docs/scripts/third-party/hljs.js +1 -1
- package/docs/scripts/third-party/popper.js +1 -1
- package/docs/scripts/third-party/tippy.js +1 -1
- package/docs/scripts/third-party/tocbot.js +508 -509
- package/docs/scripts/third-party/tocbot.min.js +0 -0
- package/docs/static/bitcoin.jpeg +0 -0
- package/docs/static/home.md +0 -0
- package/docs/static/logo-ecosystem.png +0 -0
- package/docs/static/logo.png +0 -0
- package/docs/styles/clean-jsdoc-theme-base.css +0 -0
- package/docs/styles/clean-jsdoc-theme-dark.css +0 -0
- package/docs/styles/clean-jsdoc-theme-light.css +0 -0
- package/docs/styles/clean-jsdoc-theme-scrollbar.css +0 -0
- package/docs/styles/clean-jsdoc-theme-without-scrollbar.min.css +0 -0
- package/docs/styles/clean-jsdoc-theme.min.css +0 -0
- package/extend/bajo/intl/en-US.json +0 -0
- package/extend/bajo/intl/id.json +0 -0
- package/extend/bajoTemplate/layout/default.html +0 -0
- package/extend/bajoTemplate/layout/email.html +0 -0
- package/extend/bajoTemplate/layout/email.id.html +0 -0
- package/extend/bajoTemplate/partial/script-block.html +0 -0
- package/extend/bajoTemplate/partial/style-block.html +0 -0
- package/index.js +3 -6
- package/lib/resolve-resource.js +0 -0
- package/package.json +3 -2
- package/wiki/CHANGES.md +5 -0
- package/wiki/CONFIG.md +0 -0
- package/wiki/CONTRIBUTING.md +0 -0
|
File without changes
|
package/docs/static/bitcoin.jpeg
CHANGED
|
File without changes
|
package/docs/static/home.md
CHANGED
|
File without changes
|
|
File without changes
|
package/docs/static/logo.png
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/extend/bajo/intl/id.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/index.js
CHANGED
|
@@ -16,9 +16,7 @@ async function factory (pkgName) {
|
|
|
16
16
|
*
|
|
17
17
|
* @class
|
|
18
18
|
*/
|
|
19
|
-
class BajoTemplate extends this.app.
|
|
20
|
-
static alias = 'tpl'
|
|
21
|
-
|
|
19
|
+
class BajoTemplate extends this.app.baseClass.Base {
|
|
22
20
|
constructor () {
|
|
23
21
|
super(pkgName, me.app)
|
|
24
22
|
this.config = {
|
|
@@ -225,7 +223,7 @@ async function factory (pkgName) {
|
|
|
225
223
|
|
|
226
224
|
parseFrontMatter = async (input = '', lang) => {
|
|
227
225
|
const { isEmpty, isPlainObject, isArray, filter, map } = this.app.lib._
|
|
228
|
-
const { parseObject } = this.app.
|
|
226
|
+
const { parseObject } = this.app.lib
|
|
229
227
|
const handlers = map(filter(this.app.configHandlers, h => !['.js'].includes(h.ext)), h => h.readHandler)
|
|
230
228
|
let success
|
|
231
229
|
for (const handler of handlers) {
|
|
@@ -242,8 +240,7 @@ async function factory (pkgName) {
|
|
|
242
240
|
|
|
243
241
|
compile = async (content, locals, { lang, ttl = 0 } = {}) => {
|
|
244
242
|
locals.attr = locals.attr ?? {}
|
|
245
|
-
const
|
|
246
|
-
const { template } = _
|
|
243
|
+
const { template } = this.app.lib._
|
|
247
244
|
const cache = this.app.bajoCache
|
|
248
245
|
let canCache = this.config.cache !== false && cache && this.app.bajo.config.env !== 'dev'
|
|
249
246
|
if (ttl === -1) canCache = false
|
package/lib/resolve-resource.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bajo-template",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Template Renderer for Bajo Framework",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
},
|
|
10
10
|
"type": "module",
|
|
11
11
|
"bajo": {
|
|
12
|
-
"type": "plugin"
|
|
12
|
+
"type": "plugin",
|
|
13
|
+
"alias": "tpl"
|
|
13
14
|
},
|
|
14
15
|
"repository": {
|
|
15
16
|
"type": "git",
|
package/wiki/CHANGES.md
ADDED
package/wiki/CONFIG.md
CHANGED
|
File without changes
|
package/wiki/CONTRIBUTING.md
CHANGED
|
File without changes
|