evophp 1.2.1 → 1.2.3
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/commands/new.js +12 -12
- package/package.json +1 -1
- package/templates/js.router.js +8 -1
package/commands/new.js
CHANGED
|
@@ -129,25 +129,25 @@ async function setupPluginRepo(token, author, pluginName) {
|
|
|
129
129
|
return entry;
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
async function setupTheme(token, author,
|
|
133
|
-
await createGitHubRepo(token, "kinsokafor/EvoTheme",
|
|
132
|
+
async function setupTheme(token, author, themeName) {
|
|
133
|
+
await createGitHubRepo(token, "kinsokafor/EvoTheme", themeName);
|
|
134
134
|
await cloneRepo(
|
|
135
135
|
author,
|
|
136
|
-
|
|
137
|
-
path.join("Public", "Themes",
|
|
136
|
+
themeName,
|
|
137
|
+
path.join("Public", "Themes", themeName)
|
|
138
138
|
);
|
|
139
139
|
|
|
140
|
-
await editFile(`./Public/Themes/${
|
|
141
|
-
|
|
140
|
+
await editFile(`./Public/Themes/${themeName}/Data/index.data.php`, {
|
|
141
|
+
themeName,
|
|
142
142
|
});
|
|
143
|
-
await editFile(`./Public/Themes/${
|
|
144
|
-
|
|
143
|
+
await editFile(`./Public/Themes/${themeName}/Data/login.data.php`, {
|
|
144
|
+
themeName,
|
|
145
145
|
});
|
|
146
|
-
await editFile(`./Public/Themes/${
|
|
147
|
-
|
|
146
|
+
await editFile(`./Public/Themes/${themeName}/Views/index.blade.php`, {
|
|
147
|
+
themeName,
|
|
148
148
|
});
|
|
149
|
-
await editFile(`./Public/Themes/${
|
|
150
|
-
|
|
149
|
+
await editFile(`./Public/Themes/${themeName}/Views/login.blade.php`, {
|
|
150
|
+
themeName,
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
153
|
|
package/package.json
CHANGED
package/templates/js.router.js
CHANGED
|
@@ -20,7 +20,14 @@ const router = createRouter({
|
|
|
20
20
|
});
|
|
21
21
|
|
|
22
22
|
router.beforeEach((to, from, next) => {
|
|
23
|
-
|
|
23
|
+
dlet title = to.meta.title || "";
|
|
24
|
+
|
|
25
|
+
// Replace all placeholders like :paramName with their values
|
|
26
|
+
title = title.replace(/:([a-zA-Z0-9_]+)/g, (_, key) => {
|
|
27
|
+
return to.params[key] ?? "";
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
document.title = title;
|
|
24
31
|
next();
|
|
25
32
|
});
|
|
26
33
|
|