create-jilatax 0.0.4 → 0.0.7

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 CHANGED
@@ -6,6 +6,11 @@ Requires Node.js 22.18 or newer and Bun.
6
6
 
7
7
  ## Create an application
8
8
 
9
+ ```sh
10
+ bun create jilatax@latest
11
+ ```
12
+ ---
13
+
9
14
  ```bash
10
15
  bunx create-jilatax@latest my-app
11
16
  cd my-app
package/dist/bin.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  //#region src/bin.ts
3
- require("./cli-BO6toXiq.cjs").runCreateCli().then((exitCode) => {
3
+ require("./cli-D56yqirN.cjs").runCreateCli().then((exitCode) => {
4
4
  process.exitCode = exitCode;
5
5
  });
6
6
  //#endregion
package/dist/bin.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { n as runCreateCli } from "./cli-BQK3vkvN.js";
2
+ import { n as runCreateCli } from "./cli-yS2KRczW.js";
3
3
  //#region src/bin.ts
4
4
  runCreateCli().then((exitCode) => {
5
5
  process.exitCode = exitCode;
@@ -30,8 +30,9 @@ node_path = __toESM(node_path, 1);
30
30
  let node_url = require("node:url");
31
31
  let jilatax = require("jilatax");
32
32
  //#region src/generator.ts
33
- const JILATAX_CLI_VERSION = "^0.0.7";
34
- const JILATAX_VERSION = "^0.0.5";
33
+ const JILATAX_CLI_VERSION = "^0.0.8";
34
+ const JILATAX_VERSION = "^0.0.6";
35
+ const LYNX_QRCODE_PLUGIN_VERSION = "^0.4.4";
35
36
  const LYNX_REACT_VERSION = "^0.116.2";
36
37
  const LYNX_TYPES_VERSION = "^3.7.0";
37
38
  const REACT_PLUGIN_VERSION = "^0.12.7";
@@ -164,6 +165,7 @@ async function writeGeneratedMetadata(projectRoot, config, projectName) {
164
165
  },
165
166
  devDependencies: {
166
167
  "@jilatax/cli": JILATAX_CLI_VERSION,
168
+ "@lynx-js/qrcode-rsbuild-plugin": LYNX_QRCODE_PLUGIN_VERSION,
167
169
  "@lynx-js/react-rsbuild-plugin": REACT_PLUGIN_VERSION,
168
170
  "@lynx-js/rspeedy": RSPEEDY_VERSION,
169
171
  "@lynx-js/types": LYNX_TYPES_VERSION,
@@ -174,7 +176,7 @@ async function writeGeneratedMetadata(projectRoot, config, projectName) {
174
176
  };
175
177
  await (0, node_fs_promises.writeFile)(node_path.default.join(projectRoot, "package.json"), `${JSON.stringify(packageJson, null, 2)}\n`, "utf8");
176
178
  await (0, node_fs_promises.writeFile)(node_path.default.join(projectRoot, "app.json"), `${JSON.stringify(config, null, 2)}\n`, "utf8");
177
- await (0, node_fs_promises.writeFile)(node_path.default.join(projectRoot, "android", "jilatax.properties"), (0, jilatax.serializeAndroidProjectConfig)(config), "utf8");
179
+ await (0, jilatax.syncAndroidProjectConfig)(projectRoot, config);
178
180
  if (process.platform !== "win32") await (0, node_fs_promises.chmod)(node_path.default.join(projectRoot, "android", "gradlew"), 493);
179
181
  }
180
182
  function createInitialConfig(displayName, projectName, packageId) {
@@ -184,15 +186,25 @@ function createInitialConfig(displayName, projectName, packageId) {
184
186
  $schema: "./node_modules/jilatax/schema/app.schema.json",
185
187
  jilatax: {
186
188
  android: {
189
+ adaptiveIcon: {
190
+ backgroundColor: "#E8FFF2",
191
+ foregroundImage: "./assets/splash-icon.png"
192
+ },
187
193
  package: packageId,
188
194
  predictiveBackGestureEnabled: false,
189
195
  versionCode: 1
190
196
  },
197
+ icon: "./assets/icon.png",
191
198
  name: displayName,
192
199
  orientation: "portrait",
193
200
  scheme: schemeBase || "jilatax-app",
194
201
  slug,
195
- splash: { backgroundColor: "#0F172A" },
202
+ splash: {
203
+ backgroundColor: "#041A17",
204
+ image: "./assets/splash-icon.png",
205
+ imageWidth: 96,
206
+ resizeMode: "contain"
207
+ },
196
208
  userInterfaceStyle: "automatic",
197
209
  version: "1.0.0"
198
210
  }
@@ -4,10 +4,11 @@ import { stdin, stdout } from "node:process";
4
4
  import { spawn } from "node:child_process";
5
5
  import path from "node:path";
6
6
  import { fileURLToPath } from "node:url";
7
- import { parseAppConfig, serializeAndroidProjectConfig } from "jilatax";
7
+ import { parseAppConfig, syncAndroidProjectConfig } from "jilatax";
8
8
  //#region src/generator.ts
9
- const JILATAX_CLI_VERSION = "^0.0.7";
10
- const JILATAX_VERSION = "^0.0.5";
9
+ const JILATAX_CLI_VERSION = "^0.0.8";
10
+ const JILATAX_VERSION = "^0.0.6";
11
+ const LYNX_QRCODE_PLUGIN_VERSION = "^0.4.4";
11
12
  const LYNX_REACT_VERSION = "^0.116.2";
12
13
  const LYNX_TYPES_VERSION = "^3.7.0";
13
14
  const REACT_PLUGIN_VERSION = "^0.12.7";
@@ -140,6 +141,7 @@ async function writeGeneratedMetadata(projectRoot, config, projectName) {
140
141
  },
141
142
  devDependencies: {
142
143
  "@jilatax/cli": JILATAX_CLI_VERSION,
144
+ "@lynx-js/qrcode-rsbuild-plugin": LYNX_QRCODE_PLUGIN_VERSION,
143
145
  "@lynx-js/react-rsbuild-plugin": REACT_PLUGIN_VERSION,
144
146
  "@lynx-js/rspeedy": RSPEEDY_VERSION,
145
147
  "@lynx-js/types": LYNX_TYPES_VERSION,
@@ -150,7 +152,7 @@ async function writeGeneratedMetadata(projectRoot, config, projectName) {
150
152
  };
151
153
  await writeFile(path.join(projectRoot, "package.json"), `${JSON.stringify(packageJson, null, 2)}\n`, "utf8");
152
154
  await writeFile(path.join(projectRoot, "app.json"), `${JSON.stringify(config, null, 2)}\n`, "utf8");
153
- await writeFile(path.join(projectRoot, "android", "jilatax.properties"), serializeAndroidProjectConfig(config), "utf8");
155
+ await syncAndroidProjectConfig(projectRoot, config);
154
156
  if (process.platform !== "win32") await chmod(path.join(projectRoot, "android", "gradlew"), 493);
155
157
  }
156
158
  function createInitialConfig(displayName, projectName, packageId) {
@@ -160,15 +162,25 @@ function createInitialConfig(displayName, projectName, packageId) {
160
162
  $schema: "./node_modules/jilatax/schema/app.schema.json",
161
163
  jilatax: {
162
164
  android: {
165
+ adaptiveIcon: {
166
+ backgroundColor: "#E8FFF2",
167
+ foregroundImage: "./assets/splash-icon.png"
168
+ },
163
169
  package: packageId,
164
170
  predictiveBackGestureEnabled: false,
165
171
  versionCode: 1
166
172
  },
173
+ icon: "./assets/icon.png",
167
174
  name: displayName,
168
175
  orientation: "portrait",
169
176
  scheme: schemeBase || "jilatax-app",
170
177
  slug,
171
- splash: { backgroundColor: "#0F172A" },
178
+ splash: {
179
+ backgroundColor: "#041A17",
180
+ image: "./assets/splash-icon.png",
181
+ imageWidth: 96,
182
+ resizeMode: "contain"
183
+ },
172
184
  userInterfaceStyle: "automatic",
173
185
  version: "1.0.0"
174
186
  }
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_cli = require("./cli-BO6toXiq.cjs");
2
+ const require_cli = require("./cli-D56yqirN.cjs");
3
3
  exports.createHelpText = require_cli.createHelpText;
4
4
  exports.createProject = require_cli.createProject;
5
5
  exports.defaultPackageId = require_cli.defaultPackageId;
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as normalizeDisplayName, i as defaultPackageId, n as runCreateCli, o as normalizeProjectName, r as createProject, s as validatePackageId, t as createHelpText } from "./cli-BQK3vkvN.js";
1
+ import { a as normalizeDisplayName, i as defaultPackageId, n as runCreateCli, o as normalizeProjectName, r as createProject, s as validatePackageId, t as createHelpText } from "./cli-yS2KRczW.js";
2
2
  export { createHelpText, createProject, defaultPackageId, normalizeDisplayName, normalizeProjectName, runCreateCli, validatePackageId };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-jilatax",
3
- "version": "0.0.4",
3
+ "version": "0.0.7",
4
4
  "packageManager": "bun@1.3.4",
5
5
  "description": "Create an Android-first Jilatax application for Lynx and Rspeedy.",
6
6
  "type": "module",
@@ -45,7 +45,7 @@
45
45
 
46
46
  "dependencies": {
47
47
  "@clack/prompts": "^1.7.0",
48
- "jilatax": "^0.0.5"
48
+ "jilatax": "^0.0.6"
49
49
  },
50
50
 
51
51
  "devDependencies": {
@@ -18,6 +18,9 @@ To run only the Lynx development server:
18
18
  bun run dev
19
19
  ```
20
20
 
21
+ When the build is ready, scan the printed QR code with the Lynx application on
22
+ the same network to preview the bundle on a device.
23
+
21
24
  ## Android App Bundle
22
25
 
23
26
  ```bash
@@ -29,3 +32,7 @@ Play Store release. Never commit signing credentials.
29
32
 
30
33
  Application metadata lives in `app.json`. Android is the only supported native
31
34
  platform in this phase.
35
+
36
+ Default launcher and splash artwork lives in `assets/`. Update the image paths,
37
+ background colors, or splash width in `app.json`; Jilatax synchronizes those
38
+ resources before each Android build.
@@ -60,12 +60,12 @@ android {
60
60
  manifestPlaceholders["jilataxPredictiveBack"] = predictiveBack.toString()
61
61
  manifestPlaceholders["jilataxScheme"] = appScheme
62
62
  resValue("string", "jilatax_app_name", appName)
63
- resValue("color", "jilatax_icon_background", splashBackground)
64
63
  resValue("color", "jilatax_splash_background", splashBackground)
65
64
  }
66
65
 
67
66
  sourceSets {
68
67
  getByName("main").assets.srcDir(file("../../.jilatax/android-assets"))
68
+ getByName("main").res.srcDir(file("../../.jilatax/android-res"))
69
69
  }
70
70
 
71
71
  signingConfigs {
@@ -1,7 +1,7 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
2
  <resources>
3
3
  <style name="Theme.Jilatax.Starting" parent="Theme.Jilatax">
4
- <item name="android:windowSplashScreenAnimatedIcon">@drawable/jilatax_mark_foreground</item>
4
+ <item name="android:windowSplashScreenAnimatedIcon">@drawable/jilatax_splash_icon</item>
5
5
  <item name="android:windowSplashScreenAnimationDuration">300</item>
6
6
  <item name="android:windowSplashScreenBackground">@color/jilatax_splash_background</item>
7
7
  </style>
Binary file
Binary file
@@ -1,3 +1,4 @@
1
+ import { pluginQRCode } from '@lynx-js/qrcode-rsbuild-plugin';
1
2
  import { pluginReactLynx } from '@lynx-js/react-rsbuild-plugin';
2
3
  import { defineConfig } from '@lynx-js/rspeedy';
3
4
 
@@ -13,5 +14,12 @@ export default defineConfig({
13
14
  bundle: '[name].lynx.bundle',
14
15
  },
15
16
  },
16
- plugins: [pluginReactLynx()],
17
+ plugins: [
18
+ pluginQRCode({
19
+ schema(url: string): string {
20
+ return `${url}?fullscreen=true`;
21
+ },
22
+ }),
23
+ pluginReactLynx(),
24
+ ],
17
25
  });
@@ -1,11 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <vector
3
- xmlns:android="http://schemas.android.com/apk/res/android"
4
- android:width="108dp"
5
- android:height="108dp"
6
- android:viewportWidth="108"
7
- android:viewportHeight="108">
8
- <path
9
- android:fillColor="#38BDF8"
10
- android:pathData="M24,22 L84,22 L84,34 L62,34 L62,68 C62,82 53,90 39,90 C32,90 26,88 21,84 L27,73 C31,76 35,78 39,78 C46,78 50,74 50,67 L50,34 L24,34 Z" />
11
- </vector>
@@ -1,9 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
3
- <item android:drawable="@color/jilatax_splash_background" />
4
- <item
5
- android:width="108dp"
6
- android:height="108dp"
7
- android:drawable="@drawable/jilatax_mark_foreground"
8
- android:gravity="center" />
9
- </layer-list>
@@ -1,12 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <vector
3
- xmlns:android="http://schemas.android.com/apk/res/android"
4
- android:width="108dp"
5
- android:height="108dp"
6
- android:viewportWidth="108"
7
- android:viewportHeight="108">
8
- <path android:fillColor="#0F172A" android:pathData="M0,0 L108,0 L108,108 L0,108 Z" />
9
- <path
10
- android:fillColor="#38BDF8"
11
- android:pathData="M24,22 L84,22 L84,34 L62,34 L62,68 C62,82 53,90 39,90 C32,90 26,88 21,84 L27,73 C31,76 35,78 39,78 C46,78 50,74 50,67 L50,34 L24,34 Z" />
12
- </vector>
@@ -1,12 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <vector
3
- xmlns:android="http://schemas.android.com/apk/res/android"
4
- android:width="108dp"
5
- android:height="108dp"
6
- android:viewportWidth="108"
7
- android:viewportHeight="108">
8
- <path android:fillColor="#0F172A" android:pathData="M54,4 A50,50 0,1 0,54 104 A50,50 0,1 0,54 4" />
9
- <path
10
- android:fillColor="#38BDF8"
11
- android:pathData="M24,22 L84,22 L84,34 L62,34 L62,68 C62,82 53,90 39,90 C32,90 26,88 21,84 L27,73 C31,76 35,78 39,78 C46,78 50,74 50,67 L50,34 L24,34 Z" />
12
- </vector>
@@ -1,5 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3
- <background android:drawable="@color/jilatax_icon_background" />
4
- <foreground android:drawable="@drawable/jilatax_mark_foreground" />
5
- </adaptive-icon>
@@ -1,5 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3
- <background android:drawable="@color/jilatax_icon_background" />
4
- <foreground android:drawable="@drawable/jilatax_mark_foreground" />
5
- </adaptive-icon>