🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

node-oojs-utility

Package Overview
Dependencies
Maintainers
2
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-oojs-utility - npm Package Compare versions

Comparing version
1.2.3
to
1.2.4
+1
-1
package.json

@@ -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 @@ /**