create-venture 0.1.0 → 0.1.1
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/index.mjs +2 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -119,7 +119,8 @@ if (answers.dump) {
|
|
|
119
119
|
|
|
120
120
|
// The venture's package.json: the framework as a dev dependency and the four scripts (I-17).
|
|
121
121
|
const fromClone = existsSync(join(framework, "test.mjs")) && !framework.split("/").includes("node_modules");
|
|
122
|
-
|
|
122
|
+
// A dependency value is a range or a location, never name@range: --framework naive-framework@^0.2 keeps ^0.2.
|
|
123
|
+
const spec = opt("framework")?.replace(new RegExp(`^${fw.name}@`), "") ?? (fromClone ? `file:${framework}` : `^${fw.version}`);
|
|
123
124
|
writeFileSync(join(dir, "package.json"), JSON.stringify({
|
|
124
125
|
name: id, private: true, type: "module",
|
|
125
126
|
scripts: { dev: "naive dev", build: "naive build", start: "naive start", check: "naive check" },
|