node-oojs-utility
Advanced tools
+1
-1
@@ -6,3 +6,3 @@ { | ||
| "main": "./src/module.js", | ||
| "version": "1.2.3", | ||
| "version": "1.2.4", | ||
| "engines": { | ||
@@ -9,0 +9,0 @@ "node": ">=0.10.0" |
@@ -179,3 +179,3 @@ // npm install node-oojs-utility -g | ||
| for (var i = 0; i < sourceFilePath.length; i++) { | ||
| this.fs.writeFileSync(sourceFilePath[i], ';(function(oojs) {' + sourceStr + '})(_dup_global.oojs);'); | ||
| this.fileSync.writeFileSync(sourceFilePath[i], ';(function(oojs) {' + sourceStr + '})(_dup_global.oojs);'); | ||
| } | ||
@@ -185,3 +185,3 @@ console.log(moduleName, 'source build successfully'); | ||
| for (var i = 0; i < formatFilePath.length; i++) { | ||
| this.fs.writeFileSync(formatFilePath[i], ';(function(oojs) {' + formatStr + '})(_dup_global.oojs);'); | ||
| this.fileSync.writeFileSync(formatFilePath[i], ';(function(oojs) {' + formatStr + '})(_dup_global.oojs);'); | ||
| } | ||
@@ -197,3 +197,3 @@ console.log(moduleName, 'format build successfully'); | ||
| var compressStr = this.jsHelper.compressSync(formatStr); | ||
| this.fs.writeFileSync(compressFilePath[i], ';(function(oojs) {' + compressStr + '})(_dup_global.oojs);'); | ||
| this.fileSync.writeFileSync(compressFilePath[i], ';(function(oojs) {' + compressStr + '})(_dup_global.oojs);'); | ||
| } | ||
@@ -452,3 +452,3 @@ console.log(moduleName, 'compress build successfully'); | ||
| var tempFilePath = filePathArr[i]; | ||
| this.fs.writeFileSync(tempFilePath, totalStr); | ||
| this.fileSync.writeFileSync(tempFilePath, totalStr); | ||
| } | ||
@@ -468,3 +468,3 @@ | ||
| var tempFilePath = filePathArr[i]; | ||
| this.fs.writeFileSync(tempFilePath, compressStr); | ||
| this.fileSync.writeFileSync(tempFilePath, compressStr); | ||
| } | ||
@@ -471,0 +471,0 @@ return compressStr; |
@@ -133,2 +133,14 @@ /** | ||
| }, | ||
| /** | ||
| * 写入文件, 会自动递归创建目标文件夹 | ||
| * @param {string} file 文件名 | ||
| * @param {string|Buffer} data 待写入的数据 | ||
| * @param {Object} option 选项 | ||
| */ | ||
| writeFileSync: function(file, data, option){ | ||
| var dirPath = this.path.dirname(file); | ||
| this.mkdirSync(dirPath); | ||
| this.fs.writeFileSync(file, data, option); | ||
| }, | ||
@@ -135,0 +147,0 @@ /** |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
481114
0.09%4345
0.25%