create-obsidian-arrow 0.4.0 → 0.4.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 +13 -0
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -181,6 +181,14 @@ function update(targetArg) {
|
|
|
181
181
|
}
|
|
182
182
|
const pkgChanges = mergePackageJson(path.join(root, "package.json"));
|
|
183
183
|
|
|
184
|
+
// Create stories/ if missing — user-owned (never overwritten), but must
|
|
185
|
+
// exist before the first story file can be added.
|
|
186
|
+
const storiesDir = path.join(root, "stories");
|
|
187
|
+
const storiesCreated = !fs.existsSync(storiesDir);
|
|
188
|
+
if (storiesCreated && !dryRun) {
|
|
189
|
+
fs.mkdirSync(storiesDir);
|
|
190
|
+
}
|
|
191
|
+
|
|
184
192
|
const verb = dryRun ? "Would refresh" : "Refreshed";
|
|
185
193
|
console.log(
|
|
186
194
|
`${verb} ${written.length} managed file(s) in ${path.relative(process.cwd(), root) || "."}:`
|
|
@@ -188,6 +196,11 @@ function update(targetArg) {
|
|
|
188
196
|
for (const file of written) {
|
|
189
197
|
console.log(` ${file}`);
|
|
190
198
|
}
|
|
199
|
+
if (storiesCreated) {
|
|
200
|
+
console.log(
|
|
201
|
+
` stories/ ${dryRun ? "(would create empty)" : "(created empty — add your *.stories.ts files here)"}`
|
|
202
|
+
);
|
|
203
|
+
}
|
|
191
204
|
if (pkgChanges.length > 0) {
|
|
192
205
|
console.log(`package.json: ${dryRun ? "would update" : "updated"} ${pkgChanges.join(", ")}`);
|
|
193
206
|
}
|