@symbo.ls/scratch 0.3.27 → 0.3.30
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/package.json +1 -1
- package/src/factory.js +10 -2
- package/src/set.js +4 -7
- package/src/system/color.js +2 -0
package/package.json
CHANGED
package/src/factory.js
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import * as
|
|
3
|
+
import * as CONF from './config'
|
|
4
4
|
|
|
5
5
|
export const CSS_VARS = {}
|
|
6
|
-
export
|
|
6
|
+
export const CONFIG = {
|
|
7
|
+
verbose: false,
|
|
8
|
+
useVariable: false,
|
|
9
|
+
useReset: true,
|
|
10
|
+
VARS: CSS_VARS,
|
|
11
|
+
...CONF
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
|
package/src/set.js
CHANGED
|
@@ -65,13 +65,11 @@ export const setEach = (factoryName, props) => {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
export const set = recivedConfig => {
|
|
68
|
-
const { version, verbose, useVariable, ...config } = recivedConfig
|
|
68
|
+
const { version, verbose, useVariable, useReset, ...config } = recivedConfig
|
|
69
69
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
CONFIG.
|
|
73
|
-
CONFIG.useVariable = useVariable
|
|
74
|
-
// console.log(recivedConfig)
|
|
70
|
+
if (verbose !== undefined) CONFIG.verbose = verbose
|
|
71
|
+
if (useVariable !== undefined) CONFIG.useVariable = useVariable
|
|
72
|
+
if (useReset !== undefined) CONFIG.useReset = useReset
|
|
75
73
|
if ((ENV === 'test' || ENV === 'development') && CONFIG.verbose) console.log(CONFIG)
|
|
76
74
|
|
|
77
75
|
const keys = Object.keys(config)
|
|
@@ -84,7 +82,6 @@ export const set = recivedConfig => {
|
|
|
84
82
|
applyDocument()
|
|
85
83
|
applyReset()
|
|
86
84
|
|
|
87
|
-
CONFIG.VARS = CSS_VARS
|
|
88
85
|
return CONFIG
|
|
89
86
|
}
|
|
90
87
|
|