pxtorem-css 1.0.0 → 1.0.1
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/Readme.md +1 -1
- package/app.js +2 -2
- package/bin/pxtorem +15 -14
- package/package.json +1 -1
package/Readme.md
CHANGED
package/app.js
CHANGED
|
@@ -8,7 +8,6 @@ function getListOfFile(dir, type, fileList) {
|
|
|
8
8
|
files.forEach((f) => {
|
|
9
9
|
if (!f.startsWith(".")) {
|
|
10
10
|
let filePath = path.join(dir, f);
|
|
11
|
-
|
|
12
11
|
if (fs.statSync(filePath).isDirectory()) {
|
|
13
12
|
fileList = getListOfFile(filePath, type, fileList);
|
|
14
13
|
} else {
|
|
@@ -27,7 +26,8 @@ function pxtorem(
|
|
|
27
26
|
) {
|
|
28
27
|
let finalArr = [];
|
|
29
28
|
dir.forEach((v) => {
|
|
30
|
-
|
|
29
|
+
const finalDir = path.join(process.cwd(), v);
|
|
30
|
+
finalArr = finalArr.concat(getListOfFile(finalDir, type));
|
|
31
31
|
});
|
|
32
32
|
let finalPathArr = finalArr.map((v) => path.resolve(v)) || [];
|
|
33
33
|
|
package/bin/pxtorem
CHANGED
|
@@ -108,20 +108,21 @@ function readConfigFile(fileName) {
|
|
|
108
108
|
for (let key in options) {
|
|
109
109
|
if (configObj && configObj.hasOwnProperty(key)) {
|
|
110
110
|
const element = options[key];
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
111
|
+
options[key] = configObj[key];
|
|
112
|
+
// if (Array.isArray(element)) {
|
|
113
|
+
// let concatArr = element.concat(configObj[key]);
|
|
114
|
+
// let finalArr = [];
|
|
115
|
+
// concatArr.forEach((v) => {
|
|
116
|
+
// if (finalArr.length === 0) {
|
|
117
|
+
// finalArr.push(v);
|
|
118
|
+
// } else if (finalArr.indexOf(v) === -1) {
|
|
119
|
+
// finalArr.push(v);
|
|
120
|
+
// }
|
|
121
|
+
// });
|
|
122
|
+
// options[key] = finalArr;
|
|
123
|
+
// } else {
|
|
124
|
+
// options[key] = configObj[key];
|
|
125
|
+
// }
|
|
125
126
|
}
|
|
126
127
|
}
|
|
127
128
|
|