create-lunar-kit 0.1.15 → 0.1.16
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/dist/index.js +12 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -62,15 +62,23 @@ import path from "path";
|
|
|
62
62
|
import { fileURLToPath } from "url";
|
|
63
63
|
var __filename2 = fileURLToPath(import.meta.url);
|
|
64
64
|
var __dirname2 = path.dirname(__filename2);
|
|
65
|
-
var
|
|
66
|
-
var
|
|
65
|
+
var PACKAGES_DIR = path.resolve(__dirname2, "../../..");
|
|
66
|
+
var CORE_ROOT = path.join(PACKAGES_DIR, "core", "src");
|
|
67
|
+
var CORE_TEMPLATES_PATH = path.join(CORE_ROOT, "templates");
|
|
68
|
+
var CORE_SOURCE_PATH = CORE_ROOT;
|
|
67
69
|
function copyTemplate(templatePath, destPath) {
|
|
68
70
|
const fullPath = path.join(CORE_TEMPLATES_PATH, templatePath);
|
|
71
|
+
if (!fs.existsSync(fullPath)) {
|
|
72
|
+
throw new Error(`Template not found: ${fullPath}`);
|
|
73
|
+
}
|
|
69
74
|
const content = fs.readFileSync(fullPath);
|
|
70
75
|
fs.writeFileSync(destPath, content);
|
|
71
76
|
}
|
|
72
77
|
function copySource(sourcePath, destPath) {
|
|
73
78
|
const fullPath = path.join(CORE_SOURCE_PATH, sourcePath);
|
|
79
|
+
if (!fs.existsSync(fullPath)) {
|
|
80
|
+
throw new Error(`Source not found: ${fullPath}`);
|
|
81
|
+
}
|
|
74
82
|
const content = fs.readFileSync(fullPath);
|
|
75
83
|
fs.writeFileSync(destPath, content);
|
|
76
84
|
}
|
|
@@ -327,7 +335,7 @@ function closeInitProject(packageManager, name) {
|
|
|
327
335
|
// package.json
|
|
328
336
|
var package_default = {
|
|
329
337
|
name: "create-lunar-kit",
|
|
330
|
-
version: "0.1.
|
|
338
|
+
version: "0.1.16",
|
|
331
339
|
description: "Create a new React Native app with Lunar Kit and NativeWind pre-configured",
|
|
332
340
|
author: "Your Name",
|
|
333
341
|
license: "MIT",
|
|
@@ -351,7 +359,7 @@ var package_default = {
|
|
|
351
359
|
"starter"
|
|
352
360
|
],
|
|
353
361
|
dependencies: {
|
|
354
|
-
"@lunar-kit/core": "0.1.
|
|
362
|
+
"@lunar-kit/core": "0.1.16",
|
|
355
363
|
chalk: "^5.4.1",
|
|
356
364
|
commander: "^12.1.0",
|
|
357
365
|
execa: "^9.6.1",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-lunar-kit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"description": "Create a new React Native app with Lunar Kit and NativeWind pre-configured",
|
|
5
5
|
"author": "Your Name",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"starter"
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@lunar-kit/core": "0.1.
|
|
27
|
+
"@lunar-kit/core": "0.1.16",
|
|
28
28
|
"chalk": "^5.4.1",
|
|
29
29
|
"commander": "^12.1.0",
|
|
30
30
|
"execa": "^9.6.1",
|