1 Star 0 Fork 0

红尘酿酒/pgy-deploy

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
common.js 868 Bytes
一键复制 编辑 原始数据 按行查看 历史
红尘酿酒 提交于 2021-03-05 00:09 +08:00 . test
const chalk = require('chalk');
const info = chalk.blue;
const success = chalk.green;
const error = chalk.bold.red;
const warning = chalk.keyword('orange');
module.exports = {
toProjectPath(path) {
const dir = __dirname.replace(/\\/g, "/");
const res = (dir + "/" + path).replace(/\/\//g, "/");
return res;
},
myPrint(str, type = "info") {
switch (type) {
case "info":
console.log(info(str));
break;
case "success":
console.log(success(str));
break;
case "error":
console.log(error(str));
break;
case "warning":
console.log(warning(str));
break;
default:
console.log(info(str));
break;
}
}
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
NodeJS
1
https://gitee.com/hcnj/deploy.git
git@gitee.com:hcnj/deploy.git
hcnj
deploy
pgy-deploy
master

搜索帮助