@newlogic-digital/core 1.0.10 → 1.0.12

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.
Files changed (2) hide show
  1. package/index.js +7 -6
  2. package/package.json +6 -6
package/index.js CHANGED
@@ -86,8 +86,8 @@ const parseMinifyHtml = async (input, name) => {
86
86
  const defaultConfig = {
87
87
  format: 'twig',
88
88
  emails: {
89
- outputDir: resolve(process.cwd(), 'public/emails'),
90
- prodDir: resolve(process.cwd(), 'app/Templates/Emails')
89
+ outputDir: resolve(process.cwd(), 'public/email'),
90
+ appDir: resolve(process.cwd(), 'app/Templates/Emails')
91
91
  },
92
92
  posthtml: {},
93
93
  juice: {},
@@ -239,7 +239,7 @@ const defaultConfig = {
239
239
  ]
240
240
  },
241
241
  latte: {
242
- isStringFilter: (filename) => dirname(filename).endsWith('emails'),
242
+ isStringFilter: (filename) => dirname(filename).endsWith('email'),
243
243
  globals: {
244
244
  srcPath: resolve(process.cwd(), 'src'),
245
245
  templatesPath: resolve(process.cwd(), 'src/templates')
@@ -254,7 +254,8 @@ const defaultConfig = {
254
254
  return await parseMinifyHtml(input, name)
255
255
  },
256
256
  code: 'node_modules/@newlogic-digital/core/latte/CodeFilter.php'
257
- }
257
+ },
258
+ ignoredPaths: ['**/views/email/**/!(*.test).latte']
258
259
  }
259
260
  }
260
261
 
@@ -267,9 +268,9 @@ const integration = (userConfig = {}) => {
267
268
  task: {
268
269
  name: 'emails',
269
270
  action: async () => {
270
- const emails = FastGlob.sync(`${resolve(process.cwd(), userConfig.emails.outputDir)}/**`).filter(entry => entry.endsWith('prod.html'))
271
+ const emails = FastGlob.sync(`${resolve(process.cwd(), userConfig.emails.outputDir)}/**`).filter(entry => !entry.endsWith('test.html'))
271
272
  const emailsProd = emails.map(path => {
272
- return path.replace(resolve(process.cwd(), userConfig.emails.outputDir), resolve(process.cwd(), userConfig.emails.prodDir)).replace('.prod.html', '.latte')
273
+ return path.replace(resolve(process.cwd(), userConfig.emails.outputDir), resolve(process.cwd(), userConfig.emails.appDir)).replace('.html', '.latte')
273
274
  })
274
275
 
275
276
  await Promise.all(emails.map((file, i) =>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@newlogic-digital/core",
3
3
  "type": "module",
4
- "version": "1.0.10",
4
+ "version": "1.0.12",
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",
@@ -10,16 +10,16 @@
10
10
  "npm-publish": "npm publish --tag next"
11
11
  },
12
12
  "dependencies": {
13
- "@vituum/tailwind": "^0.1.2",
13
+ "@vituum/tailwind": "^0.1.4",
14
14
  "@vituum/posthtml": "^0.1.0",
15
- "@vituum/juice": "^0.1.3",
15
+ "@vituum/juice": "^0.1.5",
16
16
  "@vituum/twig": "^0.1.1",
17
17
  "@vituum/latte": "^0.1.1",
18
- "posthtml-prism": "^1.0.4",
18
+ "posthtml-prism": "^2.0.0",
19
19
  "prismjs": "^1.29.0",
20
- "html-minifier-terser": "^7.0.0",
20
+ "html-minifier-terser": "^7.1.0",
21
21
  "lodash": "^4.17.21",
22
- "vituum": "^0.0.32"
22
+ "vituum": "^0.0.41"
23
23
  },
24
24
  "files": [
25
25
  "latte",