@newlogic-digital/core 2.0.0-alpha.10 → 2.0.0-alpha.12
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +14 -7
- package/package.json +4 -4
package/index.js
CHANGED
@@ -56,6 +56,7 @@ const defaultOptions = {
|
|
56
56
|
}
|
57
57
|
},
|
58
58
|
posthtml: {
|
59
|
+
enforce: 'pre',
|
59
60
|
root: resolve(process.cwd(), 'src')
|
60
61
|
},
|
61
62
|
juice: {
|
@@ -123,8 +124,6 @@ const plugin = (options = {}) => {
|
|
123
124
|
fs.existsSync(join(os.homedir(), `.ssh/${options.cert}-key.pem`))
|
124
125
|
|
125
126
|
let defaultInput = [
|
126
|
-
'./src/views/**/*.{json,latte,twig,liquid,njk,hbs,pug,html}',
|
127
|
-
'!./src/views/**/*.{latte,twig,liquid,njk,hbs,pug,html}.json',
|
128
127
|
'./src/styles/*.{css,pcss,scss,sass,less,styl,stylus}',
|
129
128
|
'./src/scripts/*.{js,ts,mjs}'
|
130
129
|
]
|
@@ -133,14 +132,16 @@ const plugin = (options = {}) => {
|
|
133
132
|
options.mode = userEnv.mode
|
134
133
|
}
|
135
134
|
|
136
|
-
if (
|
137
|
-
userEnv.mode = 'production'
|
138
|
-
|
135
|
+
if (options.mode === 'development') {
|
139
136
|
defaultInput = [
|
137
|
+
'./src/views/**/*.{json,latte,twig,liquid,njk,hbs,pug,html}',
|
138
|
+
'!./src/views/**/*.{latte,twig,liquid,njk,hbs,pug,html}.json',
|
140
139
|
'./src/styles/*.{css,pcss,scss,sass,less,styl,stylus}',
|
141
140
|
'./src/scripts/*.{js,ts,mjs}'
|
142
141
|
]
|
143
|
-
}
|
142
|
+
}
|
143
|
+
|
144
|
+
if (options.mode === 'emails') {
|
144
145
|
userEnv.mode = 'production'
|
145
146
|
|
146
147
|
defaultInput = [
|
@@ -149,12 +150,18 @@ const plugin = (options = {}) => {
|
|
149
150
|
]
|
150
151
|
}
|
151
152
|
|
153
|
+
const outDir = resolve(userConfig.root ?? process.cwd(), 'public')
|
154
|
+
|
155
|
+
if (userConfig.build && !userConfig.build.outDir) {
|
156
|
+
userConfig.build.outDir = outDir
|
157
|
+
}
|
158
|
+
|
152
159
|
userConfig.build = Object.assign({
|
153
160
|
manifest: true,
|
154
161
|
emptyOutDir: false,
|
155
162
|
modulePreload: false,
|
156
163
|
assetsInlineLimit: 0,
|
157
|
-
outDir
|
164
|
+
outDir,
|
158
165
|
rollupOptions: {
|
159
166
|
input: defaultInput
|
160
167
|
}
|
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.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",
|
@@ -11,10 +11,10 @@
|
|
11
11
|
"eslint": "eslint '**/*.js' --fix"
|
12
12
|
},
|
13
13
|
"dependencies": {
|
14
|
-
"@vituum/vite-plugin-posthtml": "^1.0.0-alpha.
|
14
|
+
"@vituum/vite-plugin-posthtml": "^1.0.0-alpha.4",
|
15
15
|
"@vituum/vite-plugin-juice": "^1.0.0-alpha.2",
|
16
|
-
"@vituum/vite-plugin-latte": "^1.0.0-alpha.
|
17
|
-
"@vituum/vite-plugin-twig": "^1.0.0-alpha.
|
16
|
+
"@vituum/vite-plugin-latte": "^1.0.0-alpha.10",
|
17
|
+
"@vituum/vite-plugin-twig": "^1.0.0-alpha.7",
|
18
18
|
"@vituum/vite-plugin-tailwindcss": "^1.0.0-alpha.2",
|
19
19
|
"@vituum/vite-plugin-send": "^1.0.0-alpha.2",
|
20
20
|
"vituum": "^1.0.0-alpha.18",
|