create-nextspark-app 0.1.0-beta.162 → 0.1.0-beta.164
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 +11 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -70,9 +70,17 @@ async function createProject(options) {
|
|
|
70
70
|
const localCoreTarball = findLocalTarball("@nextsparkjs/core");
|
|
71
71
|
const localCliTarball = findLocalTarball("@nextsparkjs/cli");
|
|
72
72
|
const localUiTarball = findLocalTarball("@nextsparkjs/ui");
|
|
73
|
-
let
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
let ownVersion = "latest";
|
|
74
|
+
try {
|
|
75
|
+
const ownPkg = JSON.parse(
|
|
76
|
+
fs.readFileSync(new URL("../package.json", import.meta.url), "utf-8")
|
|
77
|
+
);
|
|
78
|
+
if (ownPkg.version) ownVersion = ownPkg.version;
|
|
79
|
+
} catch {
|
|
80
|
+
}
|
|
81
|
+
let corePackage = `@nextsparkjs/core@${ownVersion}`;
|
|
82
|
+
let cliPackage = `@nextsparkjs/cli@${ownVersion}`;
|
|
83
|
+
let uiPackage = `@nextsparkjs/ui@${ownVersion}`;
|
|
76
84
|
if (localCoreTarball && localCliTarball) {
|
|
77
85
|
corePackage = localCoreTarball;
|
|
78
86
|
cliPackage = localCliTarball;
|