bajo-template 1.1.9 → 1.1.11
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/package.json +1 -1
- package/plugin/factory.js +9 -4
package/package.json
CHANGED
package/plugin/factory.js
CHANGED
|
@@ -33,11 +33,15 @@ async function factory (pkgName) {
|
|
|
33
33
|
opts.lang = opts.lang ?? lang
|
|
34
34
|
return this.app.bajo.format(val, type, opts)
|
|
35
35
|
},
|
|
36
|
-
|
|
36
|
+
_findRoute: (input) => {
|
|
37
|
+
if (!this.app.waibu) return false
|
|
38
|
+
return this.app.waibu.findRoute(input)
|
|
39
|
+
},
|
|
40
|
+
_routePath: (input, opts) => {
|
|
37
41
|
if (!this.app.waibu) return input
|
|
38
|
-
return this.app.waibu.routePath(input)
|
|
42
|
+
return this.app.waibu.routePath(input, opts)
|
|
39
43
|
},
|
|
40
|
-
_titleize: this.
|
|
44
|
+
_titleize: this.lib.aneka.titleize,
|
|
41
45
|
_hasPlugin: name => this.app.bajo.pluginNames.includes(name),
|
|
42
46
|
_jsonStringify: this.app.waibuMpa.jsonStringify,
|
|
43
47
|
_parseMarkdown: content => {
|
|
@@ -105,7 +109,8 @@ async function factory (pkgName) {
|
|
|
105
109
|
|
|
106
110
|
_handleInclude = async (content, locals = {}, opts = {}) => {
|
|
107
111
|
const { isEmpty, omit, template, merge } = this.lib._
|
|
108
|
-
const { extractText
|
|
112
|
+
const { extractText } = this.lib.aneka
|
|
113
|
+
const { breakNsPath } = this.app.bajo
|
|
109
114
|
const start = '<!-- include '
|
|
110
115
|
const end = ' -->'
|
|
111
116
|
const imports = this.buildCompileImports(opts.lang)
|