@newlogic-digital/core 0.7.1 → 0.7.5
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +18 -1
- package/modules/Scripts.js +7 -3
- package/modules/Styles.js +1 -1
- package/modules/Templates.js +1 -1
- package/package.json +9 -9
package/index.js
CHANGED
@@ -17,8 +17,25 @@ import {
|
|
17
17
|
|
18
18
|
const defineConfig = (config) => new Core().init(config);
|
19
19
|
|
20
|
+
const tailwindColors = (colors = []) => {
|
21
|
+
colors.forEach(name => {
|
22
|
+
colors[name] = ({opacityVariable, opacityValue}) => {
|
23
|
+
if (opacityValue !== undefined) {
|
24
|
+
return `rgba(var(--color-${name}), ${opacityValue})`
|
25
|
+
}
|
26
|
+
if (opacityVariable !== undefined) {
|
27
|
+
return `rgba(var(--color-${name}), var(${opacityVariable}, 1))`
|
28
|
+
}
|
29
|
+
return `rgb(var(--color-${name}))`
|
30
|
+
}
|
31
|
+
})
|
32
|
+
|
33
|
+
return colors
|
34
|
+
}
|
35
|
+
|
20
36
|
export {
|
21
37
|
defineConfig,
|
38
|
+
tailwindColors,
|
22
39
|
Core,
|
23
40
|
Utils,
|
24
41
|
Styles,
|
@@ -33,4 +50,4 @@ export {
|
|
33
50
|
Package,
|
34
51
|
Config,
|
35
52
|
root
|
36
|
-
}
|
53
|
+
}
|
package/modules/Scripts.js
CHANGED
@@ -178,7 +178,9 @@ export class Scripts {
|
|
178
178
|
delimiters: ['', '']
|
179
179
|
}),
|
180
180
|
(Config.scripts.importMap.build && typeof importMapFile["imports"] !== "undefined") && rollupImportMapPlugin(importMapFile),
|
181
|
-
!Config.scripts.importMap.build && nodeResolve(
|
181
|
+
!Config.scripts.importMap.build && nodeResolve({
|
182
|
+
browser: true
|
183
|
+
}),
|
182
184
|
!Config.scripts.importMap.build && commonjs(),
|
183
185
|
replace({
|
184
186
|
preventAssignment: true,
|
@@ -223,7 +225,9 @@ export class Scripts {
|
|
223
225
|
},
|
224
226
|
delimiters: ['', '']
|
225
227
|
}),
|
226
|
-
nodeResolve(
|
228
|
+
nodeResolve({
|
229
|
+
browser: true
|
230
|
+
}),
|
227
231
|
commonjs(),
|
228
232
|
replace({
|
229
233
|
preventAssignment: true,
|
@@ -314,4 +318,4 @@ export class Scripts {
|
|
314
318
|
});
|
315
319
|
});
|
316
320
|
}
|
317
|
-
}
|
321
|
+
}
|
package/modules/Styles.js
CHANGED
@@ -184,7 +184,7 @@ export class Styles {
|
|
184
184
|
|
185
185
|
const clean = lazypipe().pipe(cleanCSS, lodash.merge({
|
186
186
|
inline: Config.styles.import,
|
187
|
-
level: {1: {specialComments: 0}, 2: {removeEmpty:
|
187
|
+
level: {1: {specialComments: 0}, 2: {removeEmpty: true}}
|
188
188
|
}, Config.styles.clean), (details) => {
|
189
189
|
if (details.warnings.length > 0) {
|
190
190
|
details.warnings.map(warning => console.log("\x1b[32m", warning, "\x1b[0m"))
|
package/modules/Templates.js
CHANGED
@@ -419,7 +419,7 @@ export class Templates {
|
|
419
419
|
.pipe(buildLayoutClear())
|
420
420
|
.pipe(buildLayoutTwig())
|
421
421
|
.pipe(buildLayoutHbs())
|
422
|
-
.pipe(
|
422
|
+
.pipe(renameHtml())
|
423
423
|
.pipe(gulp.dest(root + Config.paths.output.root))
|
424
424
|
.on("end", resolve))
|
425
425
|
])
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@newlogic-digital/core",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.7.
|
4
|
+
"version": "0.7.5",
|
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",
|
@@ -15,11 +15,11 @@
|
|
15
15
|
"@babel/core": "^7.15.8",
|
16
16
|
"@babel/preset-env": "^7.15.8",
|
17
17
|
"@rollup/plugin-babel": "^5.3.0",
|
18
|
-
"@rollup/plugin-commonjs": "^21.0.
|
19
|
-
"@rollup/plugin-node-resolve": "^13.0.
|
18
|
+
"@rollup/plugin-commonjs": "^21.0.1",
|
19
|
+
"@rollup/plugin-node-resolve": "^13.0.6",
|
20
20
|
"@rollup/plugin-replace": "^3.0.0",
|
21
21
|
"adm-zip": "^0.5.9",
|
22
|
-
"clean-css": "^5.2.
|
22
|
+
"clean-css": "^5.2.2",
|
23
23
|
"fs-extra": "^10.0.0",
|
24
24
|
"plugin-error": "^1.0.1",
|
25
25
|
"through2": "^4.0.2",
|
@@ -43,15 +43,15 @@
|
|
43
43
|
"postcss-custom-selectors": "^6.0.0",
|
44
44
|
"postcss-import": "^14.0.2",
|
45
45
|
"postcss-nesting": "^8.0.1",
|
46
|
-
"rollup": "^2.
|
46
|
+
"rollup": "^2.59.0",
|
47
47
|
"rollup-plugin-import-map": "^2.2.2",
|
48
48
|
"rollup-plugin-terser": "^7.0.2",
|
49
|
-
"vite": "~2.6.
|
49
|
+
"vite": "~2.6.13"
|
50
50
|
},
|
51
51
|
"peerDependencies": {
|
52
|
-
"autoprefixer": "^10.
|
53
|
-
"postcss": "^8.3.
|
54
|
-
"tailwindcss": "^2.2.
|
52
|
+
"autoprefixer": "^10.4.0",
|
53
|
+
"postcss": "^8.3.11",
|
54
|
+
"tailwindcss": "^2.2.19"
|
55
55
|
},
|
56
56
|
"devDependencies": {
|
57
57
|
"vitepress": "^0.13.2"
|