🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

iconfont-update-cli

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iconfont-update-cli - npm Package Compare versions

Comparing version
1.0.4
to
1.0.5
+11
-3
lib/update.js

@@ -7,3 +7,3 @@ /*

* @LastEditors: zhouxd
* @LastEditTime: 2023-03-06 12:30:05
* @LastEditTime: 2023-03-06 13:27:56
*/

@@ -124,3 +124,3 @@ const path = require("path");

}
spinner.start(chalk.blue("删除旧的newFont文件夹"));
spinner.start(chalk.blue(`删除旧的 ${chalk.red(dirName)} 文件夹`));
// 删除旧的newFont,直接删会报错,得先删内部文件

@@ -134,3 +134,3 @@ const files = fs.readdirSync(

fs.rmdirSync(path.join(process.cwd(), updatePath + dirName));
spinner.succeed(chalk.green("删除旧的newFont文件夹"));
spinner.succeed(chalk.green(`删除旧的 ${chalk.red(dirName)} 文件夹`));

@@ -147,2 +147,10 @@ spinner.start(chalk.blue("重命名文件夹"));

});
if(updateId == '1475975'){
let fileText = fs.readFileSync(path.join(process.cwd(),updatePath, dirName + '/iconfont.css'),'utf8')
const reg = /font-size: (16)px/g;
if(reg.test(fileText)){
fileText = fileText.replace(reg,($0,$1)=>{return $0.replace($1,20)})
}
fs.writeFileSync(path.join(process.cwd(),updatePath, dirName + '/iconfont.css'),fileText)
}
spinner.succeed(chalk.green("重命名文件夹"));

@@ -149,0 +157,0 @@ spinner.start(chalk.blue("关闭浏览器"));

{
"name": "iconfont-update-cli",
"version": "1.0.4",
"version": "1.0.5",
"description": "iconfont图标库更新",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -55,3 +55,3 @@ const inquirer = require("inquirer");

name: "checkbox",
message: "请选择下列图标库进行预览",
message: "请选择下列图标库进行更新",
choices: checkBoxList,

@@ -74,3 +74,3 @@ },

name: "checkbox",
message: "请选择下列图标库进行更新",
message: "请选择下列图标库进行预览",
choices: checkBoxList,

@@ -77,0 +77,0 @@ },