xgem-cli 2.0.0-alpha → 2.0.0-alpha.1
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/README.md +2 -3
- package/package.json +4 -6
- package/scripts/check-platform.js +17 -0
package/README.md
CHANGED
|
@@ -16,11 +16,10 @@ and reconciles it automatically — see [Why the iOS build engine exists](#why-t
|
|
|
16
16
|
### Homebrew (macOS/Linux)
|
|
17
17
|
|
|
18
18
|
```sh
|
|
19
|
-
brew
|
|
20
|
-
brew install xgem
|
|
19
|
+
brew install Code4Hacker/xgem/xgem
|
|
21
20
|
```
|
|
22
21
|
|
|
23
|
-
|
|
22
|
+
xgem isn't in Homebrew's central `homebrew-core` (that requires a formal submission/review), so it lives in its own tap (`Code4Hacker/homebrew-xgem`). The `user/repo/formula` form above taps and installs in one step — no separate `brew tap` needed.
|
|
24
23
|
|
|
25
24
|
### npm
|
|
26
25
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xgem-cli",
|
|
3
|
-
"version": "2.0.0-alpha",
|
|
3
|
+
"version": "2.0.0-alpha.1",
|
|
4
4
|
"description": "Framework-aware automation CLI: scaffolds and runs clean/build/dev scripts per project type, an environment doctor, a SwiftPM-aware iOS build engine, and a git workflow helper.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"xgem": "bin/xgem"
|
|
@@ -8,16 +8,14 @@
|
|
|
8
8
|
"files": [
|
|
9
9
|
"bin/xgem",
|
|
10
10
|
"lib",
|
|
11
|
-
"templates"
|
|
12
|
-
|
|
13
|
-
"os": [
|
|
14
|
-
"darwin",
|
|
15
|
-
"linux"
|
|
11
|
+
"templates",
|
|
12
|
+
"scripts/check-platform.js"
|
|
16
13
|
],
|
|
17
14
|
"engines": {
|
|
18
15
|
"node": ">=14"
|
|
19
16
|
},
|
|
20
17
|
"scripts": {
|
|
18
|
+
"preinstall": "node scripts/check-platform.js",
|
|
21
19
|
"test": "bash -n bin/xgem && for f in lib/*.sh; do bash -n \"$f\"; done"
|
|
22
20
|
},
|
|
23
21
|
"keywords": [
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Runs as npm's preinstall step. xgem is a bash CLI (osascript/xcodebuild
|
|
3
|
+
// for the iOS engine, sh-isms throughout) with no Windows-native equivalent,
|
|
4
|
+
// so this exists purely to fail with an actionable message instead of npm's
|
|
5
|
+
// generic EBADPLATFORM error.
|
|
6
|
+
|
|
7
|
+
if (process.platform !== 'darwin' && process.platform !== 'linux') {
|
|
8
|
+
console.error('');
|
|
9
|
+
console.error('\x1b[31mxgem does not run natively on Windows.\x1b[0m');
|
|
10
|
+
console.error("It's a bash CLI, and its Flutter iOS build engine shells out to Xcode tools that only exist on macOS.");
|
|
11
|
+
console.error('');
|
|
12
|
+
console.error('\x1b[36mTo use xgem on Windows, install WSL2 first:\x1b[0m');
|
|
13
|
+
console.error(' https://learn.microsoft.com/windows/wsl/install');
|
|
14
|
+
console.error('Then run this same install command again from inside your WSL terminal (it reports itself as Linux).');
|
|
15
|
+
console.error('');
|
|
16
|
+
process.exit(1);
|
|
17
|
+
}
|