@newlogic-digital/core 0.9.9 → 0.9.10
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/modules/Core.js +2 -1
- package/modules/Templates.js +1 -1
- package/package.json +1 -1
package/modules/Core.js
CHANGED
@@ -43,6 +43,7 @@ let Config = {
|
|
43
43
|
paths: {
|
44
44
|
temp: "temp",
|
45
45
|
cdn: "temp/cdn",
|
46
|
+
base: "",
|
46
47
|
input: {
|
47
48
|
root: "src",
|
48
49
|
main: "src/main.json",
|
@@ -324,7 +325,7 @@ class Core {
|
|
324
325
|
let contents = file.contents.toString();
|
325
326
|
|
326
327
|
contents = contents.replace(new RegExp(`${Config.paths.input.assets}`, 'g'),
|
327
|
-
`${Config.paths.output.assets.replace(Config.paths.output.root + "/", "")}`)
|
328
|
+
`${Config.paths.output.assets.replace(Config.paths.output.root + "/", Config.paths.base.length > 0 ? Config.paths.base + "/" : "")}`)
|
328
329
|
|
329
330
|
file.contents = Buffer.from(contents);
|
330
331
|
|
package/modules/Templates.js
CHANGED
@@ -185,7 +185,7 @@ export class Templates {
|
|
185
185
|
}
|
186
186
|
|
187
187
|
if (Config.paths.output.rewrite && url.indexOf(`/${Config.paths.output.root}`) === 0) {
|
188
|
-
url = url.replace(`/${Config.paths.output.root}`, "")
|
188
|
+
url = url.replace(`/${Config.paths.output.root}`, Config.paths.base.length > 0 ? `/${Config.paths.base}` : "")
|
189
189
|
}
|
190
190
|
|
191
191
|
return url;
|
package/package.json
CHANGED