@newlogic-digital/core 2.0.0-alpha.1 → 2.0.0-alpha.3
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +38 -11
- package/package.json +6 -6
package/index.js
CHANGED
@@ -63,11 +63,21 @@ const defaultOptions = {
|
|
63
63
|
outputDir: resolve(process.cwd(), 'public/email'),
|
64
64
|
appDir: resolve(process.cwd(), 'app/Templates/Emails')
|
65
65
|
},
|
66
|
-
vituum: {
|
66
|
+
vituum: {
|
67
|
+
pages: {
|
68
|
+
dir: './src/views'
|
69
|
+
}
|
70
|
+
},
|
67
71
|
posthtml: {},
|
68
|
-
juice: {
|
72
|
+
juice: {
|
73
|
+
paths: ['src/views/email']
|
74
|
+
},
|
69
75
|
tailwindcss: {},
|
70
|
-
send: {
|
76
|
+
send: {
|
77
|
+
host: 'smtp.newlogic.cz',
|
78
|
+
from: 'noreply@newlogic.cz',
|
79
|
+
user: 'noreply@newlogic.cz'
|
80
|
+
},
|
71
81
|
latte: {
|
72
82
|
renderTransformedHtml: (filename) => dirname(filename).endsWith('email'),
|
73
83
|
globals: {
|
@@ -85,7 +95,7 @@ const defaultOptions = {
|
|
85
95
|
},
|
86
96
|
code: 'node_modules/@newlogic-digital/core/latte/CodeFilter.php'
|
87
97
|
},
|
88
|
-
ignoredPaths: ['**/views/email/**/!(*.test).latte']
|
98
|
+
ignoredPaths: ['**/views/email/**/!(*.test).latte', '**/emails/!(*.test).latte']
|
89
99
|
}
|
90
100
|
}
|
91
101
|
|
@@ -116,18 +126,35 @@ const plugin = (options = {}) => {
|
|
116
126
|
userConfig.plugins = plugins.concat(...userConfig.plugins)
|
117
127
|
}
|
118
128
|
|
119
|
-
|
120
|
-
userConfig?.server?.https !== false &&
|
129
|
+
const isHttps = userConfig?.server?.https !== false &&
|
121
130
|
fs.existsSync(join(os.homedir(), `.ssh/${options.cert}.pem`)) &&
|
122
131
|
fs.existsSync(join(os.homedir(), `.ssh/${options.cert}-key.pem`))
|
123
|
-
|
124
|
-
|
125
|
-
|
132
|
+
|
133
|
+
userConfig.build = Object.assign({
|
134
|
+
manifest: true,
|
135
|
+
emptyOutDir: false,
|
136
|
+
modulePreload: false,
|
137
|
+
outDir: resolve(userConfig.root ?? process.cwd(), 'public'),
|
138
|
+
rollupOptions: {
|
139
|
+
input: [
|
140
|
+
'./src/views/**/*.{json,latte,twig,liquid,njk,hbs,pug,html}',
|
141
|
+
'!./src/views/**/*.{latte,twig,liquid,njk,hbs,pug,html}.json'
|
142
|
+
]
|
143
|
+
}
|
144
|
+
}, userConfig.build ?? {})
|
145
|
+
|
146
|
+
userConfig.server = Object.assign({
|
147
|
+
host: true,
|
148
|
+
fsServe: {
|
149
|
+
strict: false
|
150
|
+
},
|
151
|
+
https: isHttps
|
152
|
+
? {
|
126
153
|
key: fs.readFileSync(join(os.homedir(), `.ssh/${options.cert}-key.pem`)),
|
127
154
|
cert: fs.readFileSync(join(os.homedir(), `.ssh/${options.cert}.pem`))
|
128
155
|
}
|
129
|
-
|
130
|
-
}
|
156
|
+
: false
|
157
|
+
}, userConfig.server ?? {})
|
131
158
|
}
|
132
159
|
}
|
133
160
|
}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@newlogic-digital/core",
|
3
3
|
"type": "module",
|
4
|
-
"version": "2.0.0-alpha.
|
4
|
+
"version": "2.0.0-alpha.3",
|
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",
|
@@ -12,11 +12,11 @@
|
|
12
12
|
},
|
13
13
|
"dependencies": {
|
14
14
|
"@vituum/vite-plugin-posthtml": "^1.0.0-alpha.3",
|
15
|
-
"@vituum/vite-plugin-juice": "^1.0.0-alpha.
|
16
|
-
"@vituum/vite-plugin-latte": "^1.0.0-alpha.
|
17
|
-
"@vituum/vite-plugin-tailwindcss": "^1.0.0-alpha.
|
18
|
-
"@vituum/vite-plugin-send": "^1.0.0-alpha.
|
19
|
-
"vituum": "^1.0.0-alpha.
|
15
|
+
"@vituum/vite-plugin-juice": "^1.0.0-alpha.2",
|
16
|
+
"@vituum/vite-plugin-latte": "^1.0.0-alpha.4",
|
17
|
+
"@vituum/vite-plugin-tailwindcss": "^1.0.0-alpha.2",
|
18
|
+
"@vituum/vite-plugin-send": "^1.0.0-alpha.2",
|
19
|
+
"vituum": "^1.0.0-alpha.18",
|
20
20
|
"posthtml": "^0.16.6",
|
21
21
|
"posthtml-prism": "^2.0.0",
|
22
22
|
"prismjs": "^1.29.0",
|