bajo-template 2.3.1 → 2.4.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/lib/resolve-resource.js +5 -5
- package/package.json +1 -1
- package/wiki/CHANGES.md +4 -0
package/lib/resolve-resource.js
CHANGED
|
@@ -30,23 +30,23 @@ function resolveResource (type, item = '', opts = {}, fallbackHandler) {
|
|
|
30
30
|
const exts = uniq([`.${fallbackLang}${ext}`, ext])
|
|
31
31
|
if (opts.lang) exts.unshift(`.${opts.lang}${ext}`)
|
|
32
32
|
|
|
33
|
-
const extension = subSubNs ?
|
|
33
|
+
const extension = subSubNs ? `${subSubNs}/` : ''
|
|
34
34
|
let file
|
|
35
35
|
// check main override: theme specific
|
|
36
36
|
if (opts.theme) {
|
|
37
|
-
const check = `${this.app.main.dir.pkg}/extend/${this.ns}
|
|
37
|
+
const check = `${this.app.main.dir.pkg}/extend/${this.ns}/${opts.theme}/${ns}/${type}/`
|
|
38
38
|
file = filecheck.call(this, { dir, base, exts, check })
|
|
39
39
|
}
|
|
40
40
|
// check main override: common
|
|
41
41
|
if (!file) {
|
|
42
|
-
const check = `${this.app.main.dir.pkg}/extend/${this.ns}
|
|
42
|
+
const check = `${this.app.main.dir.pkg}/extend/${this.ns}/${ns}/${type}`
|
|
43
43
|
file = filecheck.call(this, { dir, base, exts, check })
|
|
44
44
|
}
|
|
45
45
|
// check override: theme specific
|
|
46
46
|
if (opts.theme && !file) {
|
|
47
47
|
const theme = find(this.app.waibuMpa.themes, { name: opts.theme })
|
|
48
48
|
if (theme) {
|
|
49
|
-
const check = `${theme.plugin.dir.pkg}/extend/${this.ns}
|
|
49
|
+
const check = `${theme.plugin.dir.pkg}/extend/${this.ns}/${opts.theme}/${ns}/${extension}${type}`
|
|
50
50
|
file = filecheck.call(this, { dir, base, exts, check })
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -54,7 +54,7 @@ function resolveResource (type, item = '', opts = {}, fallbackHandler) {
|
|
|
54
54
|
if (opts.theme && !file) {
|
|
55
55
|
const theme = find(this.app.waibuMpa.themes, { name: opts.theme })
|
|
56
56
|
if (theme) {
|
|
57
|
-
const check = `${theme.plugin.dir.pkg}/extend/${this.ns}/
|
|
57
|
+
const check = `${theme.plugin.dir.pkg}/extend/${this.ns}/_common/${ns}/${extension}${type}`
|
|
58
58
|
file = filecheck.call(this, { dir, base, exts, check })
|
|
59
59
|
}
|
|
60
60
|
}
|
package/package.json
CHANGED