@htmlplus/element 0.5.4 → 0.5.5
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/client/utils/config.js +6 -3
- package/package.json +1 -1
package/client/utils/config.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
let defaults = {
|
|
2
2
|
component: {}
|
|
3
3
|
};
|
|
4
|
-
let options = {};
|
|
5
4
|
export const getConfig = (...parameters) => {
|
|
6
|
-
|
|
5
|
+
if (typeof window == 'undefined')
|
|
6
|
+
return;
|
|
7
|
+
let config = window['HTMLPLUS'];
|
|
7
8
|
for (const parameter of parameters) {
|
|
8
9
|
if (!config)
|
|
9
10
|
break;
|
|
@@ -12,7 +13,9 @@ export const getConfig = (...parameters) => {
|
|
|
12
13
|
return config;
|
|
13
14
|
};
|
|
14
15
|
export const setConfig = (config, override) => {
|
|
15
|
-
|
|
16
|
+
if (typeof window == 'undefined')
|
|
17
|
+
return;
|
|
18
|
+
window['HTMLPLUS'] = merge({}, defaults, override ? {} : window['HTMLPLUS'], config);
|
|
16
19
|
};
|
|
17
20
|
const merge = (target, ...sources) => {
|
|
18
21
|
for (const source of sources) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@htmlplus/element",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Masood Abdolian <m.abdolian@gmail.com>",
|
|
6
6
|
"description": "A powerful library for building scalable, reusable, fast, tastable and lightweight design system for any web technologies. Powerd by Web Component.",
|