catylst 1.0.14 → 1.0.17
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 +1 -1
- package/postinstall.js +4 -18
package/package.json
CHANGED
package/postinstall.js
CHANGED
|
@@ -124,23 +124,7 @@ function checkJava() {
|
|
|
124
124
|
print(green(` ✓ Java ${major}`));
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
// ── 2.
|
|
128
|
-
|
|
129
|
-
function checkAndroidSdk() {
|
|
130
|
-
const androidHome =
|
|
131
|
-
process.env.ANDROID_HOME ||
|
|
132
|
-
process.env.ANDROID_SDK_ROOT ||
|
|
133
|
-
path.join(os.homedir(), "Library", "Android", "sdk");
|
|
134
|
-
|
|
135
|
-
if (fs.existsSync(androidHome)) {
|
|
136
|
-
print(green(` ✓ Android SDK`));
|
|
137
|
-
} else {
|
|
138
|
-
print(yellow(" ⚠ Android SDK not found. Set ANDROID_HOME or add sdk.dir to local.properties."));
|
|
139
|
-
print(dim(" Download Android Studio: https://developer.android.com/studio"));
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
// ── 3. Clone / update template ───────────────────────────────────────────────
|
|
127
|
+
// ── 2. Clone / update template ───────────────────────────────────────────────
|
|
144
128
|
|
|
145
129
|
function setupTemplate() {
|
|
146
130
|
fs.mkdirSync(CATYLST_DIR, { recursive: true });
|
|
@@ -276,7 +260,6 @@ function downloadJar() {
|
|
|
276
260
|
|
|
277
261
|
(async () => {
|
|
278
262
|
checkJava();
|
|
279
|
-
checkAndroidSdk();
|
|
280
263
|
setupTemplate();
|
|
281
264
|
await downloadJar();
|
|
282
265
|
|
|
@@ -289,5 +272,8 @@ function downloadJar() {
|
|
|
289
272
|
print(" " + dim("Or non-interactive:"));
|
|
290
273
|
print(" " + dim("catylst --package com.example.app --name MyApp"));
|
|
291
274
|
print("");
|
|
275
|
+
print(yellow(" Before building, add your Android SDK path to local.properties:"));
|
|
276
|
+
print(dim(" sdk.dir=/Users/<you>/Library/Android/sdk"));
|
|
277
|
+
print("");
|
|
292
278
|
process.exit(0);
|
|
293
279
|
})();
|