Skip to content

Commit

Permalink
使用双引号
Browse files Browse the repository at this point in the history
  • Loading branch information
tidy-hn committed May 31, 2020
1 parent 073a131 commit e2dead4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/res-compress/panel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ Editor.Panel.extend({
if (IsPng(Fs.readFileSync(file))) {
// 参数文档: https://pngquant.org/
let quality = '65-80'; // 图像质量
cmd = `${Tools.pngquant} --transbug --force 256 --output '${output}' --quality ${quality} '${file}'`;
cmd = `${Tools.pngquant} --transbug --force 256 --output "${output}" --quality ${quality} "${file}"`;
}
} else if (ext === '.jpeg' || ext === '.jpg') {
const IsJpg = Editor.require('packages://res-compress/node_modules/is-jpg')
Expand All @@ -181,7 +181,7 @@ Editor.Panel.extend({
// subsample: "default"//子采样:default, disable;
// };
// 参数文档: https://linux.die.net/man/1/jpegtran
cmd = `${Tools.jpegtran} -copy none -optimize -perfect -progressive -outfile '${output}' ${file}`;
cmd = `${Tools.jpegtran} -copy none -optimize -perfect -progressive -outfile "${output}" "${file}"`;
}
}
if (cmd) {
Expand Down

0 comments on commit e2dead4

Please sign in to comment.