webpack-javascript-obfuscator-plugin
Advanced tools
Comparing version 1.0.6 to 1.0.7
@@ -8,3 +8,3 @@ "use strict"; | ||
* @Date: 2021-01-28 17:03:50 | ||
* @LastEditTime: 2021-02-04 10:32:27 | ||
* @LastEditTime: 2021-02-04 11:14:04 | ||
* @LastEditors: spark | ||
@@ -60,3 +60,3 @@ * @Description: 趣看天下前端开发 | ||
compiler.hooks.run.tap(pluginName, function () { | ||
progress.start("AST加密构建过程开始!", "blue"); | ||
progress.log("AST加密构建过程开始!", "blue"); | ||
}); | ||
@@ -81,3 +81,3 @@ compiler.hooks.emit.tapAsync(pluginName, function (compilation, callback) { | ||
}; | ||
progress.setText(filename + ": AST加密完成"); | ||
progress.log(filename + ": AST加密完成"); | ||
} | ||
@@ -88,3 +88,3 @@ })(); | ||
progress.succeed("加密进程结束"); | ||
progress.log("加密进程结束"); | ||
callback(); | ||
@@ -91,0 +91,0 @@ }); |
"use strict"; | ||
var ora = require("ora"); | ||
var chalk = require("chalk"); | ||
module.exports = function () { | ||
this.spinner = ora('Loading unicorns'); | ||
this.start = function (message, color) { | ||
this.spinner.start(); | ||
this.spinner.text = color ? chalk[color](message) : message; | ||
// this.spinner = ora({ | ||
// // spinner: { | ||
// // interval: 80, // Optional | ||
// // frames: ['-', '+', '-'] | ||
// // } | ||
// }); | ||
this.log = function (message) { | ||
var color = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'red'; | ||
console.log(chalk[color](message)); | ||
}; | ||
this.setText = function (message, color) { | ||
this.spinner.text = color ? chalk[color](message) : message; | ||
}; | ||
this.stop = function () { | ||
this.spinner.stop(); | ||
}; | ||
this.warn = function (message, color) { | ||
this.spinner.warn(chalk[color](message)); | ||
}; | ||
this.succeed = function (message) { | ||
var color = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "green"; | ||
this.spinner.succeed(chalk[color](message)); | ||
}; | ||
this.fail = function (message) { | ||
var color = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "red"; | ||
this.spinner.fail(chalk[color](message)); | ||
}; | ||
}; |
{ | ||
"name": "webpack-javascript-obfuscator-plugin", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "一个简易的webpack加密javascript的插件", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
/* | ||
* @Author: spark | ||
* @Date: 2021-01-28 17:03:50 | ||
* @LastEditTime: 2021-02-04 10:53:36 | ||
* @LastEditTime: 2021-02-04 11:14:04 | ||
* @LastEditors: spark | ||
@@ -56,3 +56,3 @@ * @Description: 趣看天下前端开发 | ||
compiler.hooks.run.tap(pluginName, function () { | ||
progress.warn("AST加密构建过程开始!", "blue"); | ||
progress.log("AST加密构建过程开始!", "blue"); | ||
}); | ||
@@ -78,7 +78,7 @@ | ||
}; | ||
progress.warn(filename + ": AST加密完成"); | ||
progress.log(filename + ": AST加密完成"); | ||
} | ||
} | ||
} | ||
progress.warn("加密进程结束"); | ||
progress.log("加密进程结束"); | ||
callback(); | ||
@@ -85,0 +85,0 @@ }); |
@@ -1,30 +0,13 @@ | ||
var ora = require("ora"); | ||
var chalk = require("chalk"); | ||
module.exports = function () { | ||
this.spinner = ora({ | ||
// spinner: { | ||
// interval: 80, // Optional | ||
// frames: ['-', '+', '-'] | ||
// } | ||
}); | ||
// this.spinner = ora({ | ||
// // spinner: { | ||
// // interval: 80, // Optional | ||
// // frames: ['-', '+', '-'] | ||
// // } | ||
// }); | ||
this.start = function (message, color) { | ||
this.spinner.start(); | ||
this.spinner.text = color ? chalk[color](message) : message; | ||
}; | ||
this.setText = function (message, color) { | ||
this.spinner.text = color ? chalk[color](message) : message; | ||
}; | ||
this.stop = function () { | ||
this.spinner.stop(); | ||
}; | ||
this.warn = function (message, color = 'yellow') { | ||
this.spinner.warn(chalk[color](message)); | ||
}; | ||
this.succeed = function (message, color = "green") { | ||
this.spinner.succeed(chalk[color](message)); | ||
}; | ||
this.fail = function (message, color = "red") { | ||
this.spinner.fail(chalk[color](message)); | ||
}; | ||
this.log = function(message, color = 'red') { | ||
console.log(chalk[color](message)) | ||
} | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9824
232