vue2server7 7.0.33 → 7.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
Binary file
|
package/test/i.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { execSync } from 'child_process'
|
|
2
|
+
|
|
3
|
+
export function hasWebStorm() {
|
|
4
|
+
try {
|
|
5
|
+
const result = execSync(
|
|
6
|
+
`mdfind "kMDItemCFBundleIdentifier == 'com.jetbrains.WebStorm'"`,
|
|
7
|
+
{ encoding: 'utf-8' }
|
|
8
|
+
).trim()
|
|
9
|
+
|
|
10
|
+
return result.length > 0
|
|
11
|
+
} catch (e) {
|
|
12
|
+
return false
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// 测试
|
|
17
|
+
console.log('WebStorm 是否安装:', hasWebStorm())
|
|
Binary file
|