@newlogic-digital/core 0.9.14 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- package/modules/Emails.js +14 -1
- package/modules/Templates.js +2 -1
- package/package.json +7 -7
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
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@newlogic-digital/core",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.
|
4
|
+
"version": "0.10.0",
|
5
5
|
"main": "index.js",
|
6
6
|
"author": "New Logic Studio s.r.o.",
|
7
7
|
"description": "Set of tools that can be used to create modern web applications",
|
@@ -39,11 +39,6 @@
|
|
39
39
|
"gulp-rev-rewrite": "^5.0.0",
|
40
40
|
"lazypipe": "^1.0.2",
|
41
41
|
"lodash": "^4.17.21",
|
42
|
-
"postcss-custom-media": "^8.0.0",
|
43
|
-
"postcss-custom-properties": "^12.1.7",
|
44
|
-
"postcss-custom-selectors": "^6.0.0",
|
45
|
-
"postcss-import": "^14.1.0",
|
46
|
-
"postcss-nesting": "^10.1.6",
|
47
42
|
"rollup": "^2.73.0",
|
48
43
|
"rollup-plugin-import-map": "^2.2.2",
|
49
44
|
"rollup-plugin-terser": "^7.0.2",
|
@@ -53,7 +48,12 @@
|
|
53
48
|
"peerDependencies": {
|
54
49
|
"autoprefixer": "^10.4.7",
|
55
50
|
"postcss": "^8.4.13",
|
56
|
-
"tailwindcss": "^3.0.24"
|
51
|
+
"tailwindcss": "^3.0.24",
|
52
|
+
"postcss-custom-media": "^10.0.2",
|
53
|
+
"postcss-custom-properties": "^13.3.4",
|
54
|
+
"postcss-custom-selectors": "^7.1.6",
|
55
|
+
"postcss-import": "^16.0.0",
|
56
|
+
"postcss-nesting": "^12.0.2"
|
57
57
|
},
|
58
58
|
"devDependencies": {
|
59
59
|
"vitepress": "^0.22.4"
|