sys-shim 0.0.1-8 → 0.0.1-9

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "sys-shim",
3
3
  "private": false,
4
4
  "type": "module",
5
- "version": "0.0.1-8",
5
+ "version": "0.0.1-9",
6
6
  "main": "./script/npm-pkg/node/main.min.cjs",
7
7
  "module": "./script/npm-pkg/node/main.min.mjs",
8
8
  "browser": {
package/readme.md CHANGED
@@ -42,9 +42,9 @@ new Sys('ws://127.0.0.1:10005?token=tokentokentoken').then(main => {
42
42
  })
43
43
  ```
44
44
 
45
- ### 方式三:使用脚手架模板开发(开发中)
45
+ ### 方式三:使用脚手架模板开发
46
46
 
47
- - 命令行
47
+ - [命令行](https://wll8.github.io/sys-shim-doc/docs/cli/sys-shim.html)
48
48
  - 服务
49
49
  - 界面
50
50
 
@@ -58,14 +58,17 @@ async function getIcon(iconPath) {
58
58
  if(fs.existsSync(iconPath)) {
59
59
  return iconPath
60
60
  } else {
61
+ let icon
61
62
  try {
62
63
  const res = new url.URL(iconPath)
63
- const icon = `${res.protocol}//${res.host}/favicon.ico`
64
+ icon = `${res.protocol}//${res.host}/favicon.ico`
64
65
  const tempIcon = `${os.tmpdir()}/${filenamify(icon)}`
65
66
  fs.writeFileSync(tempIcon, await download(icon))
66
67
  return tempIcon
67
68
  } catch (error) {
68
- console.warn(`从 ${iconPath} 获取图标错误,将使用默认图标`, error)
69
+ console.warn(`从 ${icon} 获取图标错误:`)
70
+ console.warn(String(error))
71
+ console.warn(`将使用默认图标`)
69
72
  return `${pkgDir}/script/npm-pkg/shim/win/favicon.ico`
70
73
  }
71
74
  }
Binary file
Binary file