binhend 1.5.1 → 1.5.3
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/code.js +1 -2
- package/src/component.file.js +2 -1
package/package.json
CHANGED
package/src/code.js
CHANGED
|
@@ -168,8 +168,7 @@ function getComponentBaseCodes(component, rootPath) {
|
|
|
168
168
|
var codes = [];
|
|
169
169
|
|
|
170
170
|
if (componentCode) {
|
|
171
|
-
|
|
172
|
-
codes.push(`Binh.${component.type}('${url}', ${component.type})${optionCode};`);
|
|
171
|
+
codes.push(`Binh.${component.type}(${component.type})${optionCode};`);
|
|
173
172
|
codes.push(`${componentCode}\r\n`);
|
|
174
173
|
}
|
|
175
174
|
|
package/src/component.file.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
const { readdir, statSync, existsSync, copyFile, writeFile, writeFileSync, readFileSync, mkdirSync } = require('fs');
|
|
2
|
+
const { readdir, statSync, existsSync, copyFile, writeFile, writeFileSync, readFileSync, mkdirSync, rm } = require('fs');
|
|
3
3
|
const { join, dirname } = require('path');
|
|
4
4
|
|
|
5
5
|
function getItemInfo(itemPath) {
|
|
@@ -89,6 +89,7 @@ function cloneFile(filepath, outpath) {
|
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
function cloneFileIfNew(filepath, outpath) {
|
|
92
|
+
if (!existsSync(filepath)) return rm(filepath, { recursive: true, force: true });
|
|
92
93
|
if (isSameFile(filepath, outpath)) return;
|
|
93
94
|
cloneFile(filepath, outpath);
|
|
94
95
|
}
|