create-sparkling-app 2.0.0-rc.0 → 2.0.0-rc.2

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 ADDED
@@ -0,0 +1,50 @@
1
+ # create-sparkling-app
2
+
3
+ [![npm version](https://img.shields.io/npm/v/create-sparkling-app.svg)](https://npmjs.com/package/create-sparkling-app)
4
+ [![license](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](../../LICENSE)
5
+
6
+ CLI tool for creating new Sparkling app projects with pre-configured Android and iOS native shells.
7
+
8
+ ## Quick Start
9
+
10
+ ```bash
11
+ npx create-sparkling-app@latest my-app
12
+ cd my-app
13
+ npm run android # or: npm run ios
14
+ ```
15
+
16
+ > **Note:** Dependencies are installed automatically during project creation. Run `npm install` manually only if you skipped the auto-install step or need to add new dependencies.
17
+
18
+ ## Usage
19
+
20
+ ```bash
21
+ # Interactive mode (recommended)
22
+ npx create-sparkling-app@latest
23
+
24
+ # With project name
25
+ npx create-sparkling-app@latest my-app
26
+
27
+ # With verbose output
28
+ npx create-sparkling-app@latest my-app --verbose
29
+ ```
30
+
31
+ Run `npx create-sparkling-app@latest --help` to see all available options.
32
+
33
+ ## What's Included
34
+
35
+ The generated project includes:
36
+
37
+ - ReactLynx frontend with TypeScript
38
+ - Pre-configured Android native shell
39
+ - Pre-configured iOS native shell
40
+
41
+ ## Available Scripts
42
+
43
+ After creating your project, you can run:
44
+
45
+ | Script | Description |
46
+ |--------|-------------|
47
+ | `npm run build` | Build the Lynx bundle |
48
+ | `npm run android` | Build and run on Android |
49
+ | `npm run ios` | Build and run on iOS |
50
+ | `npm test` | Run tests |
package/dist/help.js CHANGED
@@ -4,15 +4,19 @@
4
4
  // LICENSE file in the root directory of this source tree.
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.default = async () => {
7
- console.log(`Sparkling CLI Usage: sparkling [command]
7
+ console.log(`Usage: create-sparkling-app [project-name] [options]
8
8
 
9
9
  Commands:
10
- init [options] Scaffold a new Sparkling project (alias: create)
11
- build[:type] Builds the current Sparkling project
10
+ init [name] Scaffold a new Sparkling project (alias: create)
12
11
  help Displays this help message
12
+
13
13
  Options:
14
14
  -v, --verbose Enable verbose logging for debugging
15
15
 
16
- Quick start:
17
- npx create-sparkling-app <dir> [options] (defaults to init)`);
16
+ Quick start:
17
+ npx create-sparkling-app my-app
18
+
19
+ After creating your project, use sparkling-cli to build and run:
20
+ npx sparkling run:android
21
+ npx sparkling run:ios`);
18
22
  };
package/dist/index.js CHANGED
@@ -8,7 +8,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.createSparklingApp = void 0;
10
10
  exports.main = main;
11
- const build_1 = __importDefault(require("./build"));
12
11
  const help_1 = __importDefault(require("./help"));
13
12
  const init_1 = __importDefault(require("./init"));
14
13
  const template_1 = require("./core/project-builder/template");
@@ -47,18 +46,13 @@ async function main() {
47
46
  }
48
47
  const args = cleanArgs;
49
48
  const commandCandidate = args[0];
50
- const isExplicitCommand = Boolean(commandCandidate && ['init', 'create', 'help', 'build'].some(prefix => commandCandidate === prefix || commandCandidate.startsWith(`${prefix}:`)));
49
+ const isExplicitCommand = Boolean(commandCandidate && ['init', 'create', 'help'].some(cmd => commandCandidate === cmd));
51
50
  const command = isExplicitCommand ? commandCandidate : 'init';
52
51
  const commandArgs = isExplicitCommand ? args.slice(1) : args;
53
52
  if (command === 'init' || command === 'create') {
54
53
  await (0, init_1.default)(commandArgs, { verbose: (0, verbose_1.isVerboseEnabled)() });
55
54
  return;
56
55
  }
57
- if (command.startsWith('build')) {
58
- const buildType = (command.slice(6) || 'all');
59
- await (0, build_1.default)(buildType);
60
- return;
61
- }
62
56
  if (command === 'help') {
63
57
  await (0, help_1.default)();
64
58
  return;
package/package.json CHANGED
@@ -1,6 +1,12 @@
1
1
  {
2
2
  "name": "create-sparkling-app",
3
- "version": "2.0.0-rc.0",
3
+ "version": "2.0.0-rc.2",
4
+ "homepage": "",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/tiktok/sparkling",
8
+ "directory": "packages/create-sparkling-app"
9
+ },
4
10
  "main": "dist/index.js",
5
11
  "types": "dist/index.d.ts",
6
12
  "files": [
@@ -16,7 +22,7 @@
16
22
  "devDependencies": {
17
23
  "@types/jest": "^29.5.12",
18
24
  "@types/inquirer": "^9.0.8",
19
- "@types/node": "^20.17.50",
25
+ "@types/node": "^22.15.0",
20
26
  "jest": "^29.7.0",
21
27
  "ts-jest": "^29.1.2",
22
28
  "typescript": "^5.8.3"