@newlogic-digital/core 0.9.14 → 0.9.15
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/Emails.js +14 -1
- package/modules/Templates.js +2 -1
- package/package.json +1 -1
package/modules/Emails.js
CHANGED
|
@@ -35,10 +35,23 @@ export class Emails {
|
|
|
35
35
|
hbsFiles = hbsFiles.replace("hbs", "{hbs,latte,tpl}")
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
let outputDir = "/" + Config.paths.output.root;
|
|
39
|
+
|
|
40
|
+
if (Config.paths.output.root === Config.paths.output.assets) {
|
|
41
|
+
outputDir = ""
|
|
42
|
+
}
|
|
43
|
+
|
|
38
44
|
const build = lazypipe().pipe(() => gulpif(twigFiles, twig({
|
|
39
45
|
functions: new Templates().functions,
|
|
40
46
|
filters: new Templates().filters,
|
|
41
|
-
extensions: new Templates().tags
|
|
47
|
+
extensions: new Templates().tags,
|
|
48
|
+
context: {
|
|
49
|
+
config: Config,
|
|
50
|
+
lang: Config.lang,
|
|
51
|
+
outputPath: "/" + Config.paths.output.root,
|
|
52
|
+
inputPath: "/" + Config.paths.input.root,
|
|
53
|
+
resolvePath: Config.serve.mode === "dev" ? "" : outputDir,
|
|
54
|
+
}
|
|
42
55
|
})))
|
|
43
56
|
.pipe(() => gulpif(hbsFiles, Modules.hbs.module(`${root + Config.paths.input.emails}/**/*.hbs`, Modules.hbs.helpers(Object.assign(new Templates().filters, new Templates().functions)))))
|
|
44
57
|
.pipe(() => gulpif("*.{hbs,twig}", rename({ extname: ".html" })))
|
package/modules/Templates.js
CHANGED
|
@@ -383,7 +383,8 @@ export class Templates {
|
|
|
383
383
|
layout: {template: Config.templates.layout}
|
|
384
384
|
}),
|
|
385
385
|
namespaces: {
|
|
386
|
-
'src': Config.paths.input.root
|
|
386
|
+
'src': Config.paths.input.root,
|
|
387
|
+
'templates': Config.paths.input.templates
|
|
387
388
|
},
|
|
388
389
|
globals: root + Config.paths.input.main
|
|
389
390
|
}
|
package/package.json
CHANGED