@newlogic-digital/core 2.0.0-alpha.8 → 2.0.0-alpha.9
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/index.js +15 -5
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -46,6 +46,7 @@ const posthtmlPrism = {
|
|
|
46
46
|
const defaultOptions = {
|
|
47
47
|
mode: null,
|
|
48
48
|
cert: 'localhost',
|
|
49
|
+
format: ['latte'],
|
|
49
50
|
emails: {
|
|
50
51
|
outputDir: resolve(process.cwd(), 'public/email'),
|
|
51
52
|
appDir: resolve(process.cwd(), 'app/Templates/Emails')
|
|
@@ -96,12 +97,21 @@ const defaultOptions = {
|
|
|
96
97
|
const plugin = (options = {}) => {
|
|
97
98
|
options = merge(defaultOptions, options)
|
|
98
99
|
|
|
100
|
+
const templatesPlugins = []
|
|
101
|
+
|
|
102
|
+
if (options.format.includes('twig')) {
|
|
103
|
+
templatesPlugins.push(twig(options.twig))
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
if (options.format.includes('latte')) {
|
|
107
|
+
templatesPlugins.push(latte(options.latte))
|
|
108
|
+
}
|
|
109
|
+
|
|
99
110
|
const plugins = [
|
|
100
111
|
vituum(options.vituum),
|
|
101
112
|
tailwindcss(options.tailwindcss),
|
|
102
113
|
posthtml(options.posthtml),
|
|
103
|
-
|
|
104
|
-
twig(options.twig),
|
|
114
|
+
...templatesPlugins,
|
|
105
115
|
juice(options.juice),
|
|
106
116
|
send(options.send),
|
|
107
117
|
posthtmlPrism
|
|
@@ -116,10 +126,10 @@ const plugin = (options = {}) => {
|
|
|
116
126
|
fs.existsSync(join(os.homedir(), `.ssh/${options.cert}-key.pem`))
|
|
117
127
|
|
|
118
128
|
let defaultInput = [
|
|
119
|
-
'./src/styles/*.{css,pcss,scss,sass,less,styl,stylus}',
|
|
120
|
-
'./src/scripts/*.{js,ts,mjs}',
|
|
121
129
|
'./src/views/**/*.{json,latte,twig,liquid,njk,hbs,pug,html}',
|
|
122
|
-
'!./src/views/**/*.{latte,twig,liquid,njk,hbs,pug,html}.json'
|
|
130
|
+
'!./src/views/**/*.{latte,twig,liquid,njk,hbs,pug,html}.json',
|
|
131
|
+
'./src/styles/*.{css,pcss,scss,sass,less,styl,stylus}',
|
|
132
|
+
'./src/scripts/*.{js,ts,mjs}'
|
|
123
133
|
]
|
|
124
134
|
|
|
125
135
|
if (!options.mode) {
|
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.9",
|
|
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",
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@vituum/vite-plugin-posthtml": "^1.0.0-alpha.3",
|
|
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.8",
|
|
17
|
+
"@vituum/vite-plugin-twig": "^1.0.0-alpha.6",
|
|
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",
|