create-sl-ide 0.1.1 → 0.1.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 +3 -1
- package/index.mjs +12 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,10 +6,12 @@ the IDE for building slides with Claude Code or Codex.
|
|
|
6
6
|
```sh
|
|
7
7
|
pnpm create sl-ide my-deck
|
|
8
8
|
pnpm create sl-ide my-memo --memo # a memo on US Letter pages instead of slides
|
|
9
|
+
pnpm create sl-ide . # in the current (empty) folder, named after it
|
|
9
10
|
# or: npm create sl-ide@latest my-deck · bun create sl-ide my-deck
|
|
10
11
|
```
|
|
11
12
|
|
|
12
|
-
It asks a few questions
|
|
13
|
+
It asks a few questions (slides or a memo; with no name in an empty
|
|
14
|
+
folder, whether to build right there; the repo; publishing), then:
|
|
13
15
|
|
|
14
16
|
1. Clones the **latest** sl-ide template from GitHub, keeping its history as
|
|
15
17
|
the `upstream` remote, so `git pull upstream main` brings later editor
|
package/index.mjs
CHANGED
|
@@ -149,7 +149,18 @@ async function create() {
|
|
|
149
149
|
p.intro('sl-ide · new deck');
|
|
150
150
|
|
|
151
151
|
// `.` builds the deck in the current folder and names it after the folder.
|
|
152
|
-
|
|
152
|
+
// Asked too, when no name is given and this folder is empty.
|
|
153
|
+
const cwdEmpty = fs.readdirSync(process.cwd()).every((f) => f === '.DS_Store');
|
|
154
|
+
let here = positionals[0] === '.';
|
|
155
|
+
if (!positionals[0] && !o.dir && interactive && cwdEmpty) {
|
|
156
|
+
here = await ask(p.select({
|
|
157
|
+
message: 'Where should it go?',
|
|
158
|
+
options: [
|
|
159
|
+
{ value: true, label: 'This folder', hint: path.basename(process.cwd()) },
|
|
160
|
+
{ value: false, label: 'A new folder inside this one' },
|
|
161
|
+
],
|
|
162
|
+
}));
|
|
163
|
+
}
|
|
153
164
|
let name = here ? path.basename(process.cwd()) : positionals[0];
|
|
154
165
|
if (!name) {
|
|
155
166
|
if (!interactive) bail('Give the deck a name: pnpm create sl-ide my-deck');
|