bajo-template 2.2.2 → 2.3.1
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 +11 -3
- package/package.json +1 -1
- package/wiki/CHANGES.md +5 -0
package/lib/resolve-resource.js
CHANGED
|
@@ -34,7 +34,7 @@ function resolveResource (type, item = '', opts = {}, fallbackHandler) {
|
|
|
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}/extend/${ns}/${type}
|
|
37
|
+
const check = `${this.app.main.dir.pkg}/extend/${this.ns}/extend/${opts.theme}/${ns}/${type}/`
|
|
38
38
|
file = filecheck.call(this, { dir, base, exts, check })
|
|
39
39
|
}
|
|
40
40
|
// check main override: common
|
|
@@ -46,13 +46,21 @@ function resolveResource (type, item = '', opts = {}, fallbackHandler) {
|
|
|
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}/extend/${ns}/${extension}${type}`
|
|
49
|
+
const check = `${theme.plugin.dir.pkg}/extend/${this.ns}/extend/${opts.theme}/${ns}/${extension}${type}`
|
|
50
|
+
file = filecheck.call(this, { dir, base, exts, check })
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
// check override: theme specific (common)
|
|
54
|
+
if (opts.theme && !file) {
|
|
55
|
+
const theme = find(this.app.waibuMpa.themes, { name: opts.theme })
|
|
56
|
+
if (theme) {
|
|
57
|
+
const check = `${theme.plugin.dir.pkg}/extend/${this.ns}/extend/_common/${ns}/${extension}${type}`
|
|
50
58
|
file = filecheck.call(this, { dir, base, exts, check })
|
|
51
59
|
}
|
|
52
60
|
}
|
|
53
61
|
// check real: theme specific
|
|
54
62
|
if (opts.theme && !file) {
|
|
55
|
-
const check = `${this.app[ns].dir.pkg}/extend/${this.ns}/${extension}${type}
|
|
63
|
+
const check = `${this.app[ns].dir.pkg}/extend/${this.ns}/${opts.theme}/${extension}${type}`
|
|
56
64
|
file = filecheck.call(this, { dir, base, exts, check })
|
|
57
65
|
}
|
|
58
66
|
// check real: common
|
package/package.json
CHANGED