create-ncblock 0.0.24 → 0.0.26
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 +17 -13
- package/package.json +1 -1
- package/scripts/init.ts +2 -2
- package/sdk-version.json +1 -1
package/README.md
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
> [!NOTE]
|
|
4
4
|
> Nothing to see here. This is **extreme** alpha and currently only works for an unreleased product.
|
|
5
5
|
|
|
6
|
-
Works with `
|
|
6
|
+
Works with `npm create`, `bun create`, `pnpm create`, `yarn create`, and other create-package runners.
|
|
7
7
|
|
|
8
8
|
```
|
|
9
|
-
|
|
9
|
+
npm create ncblock my-view
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
No GitHub authentication required — templates are bundled in the package.
|
|
@@ -16,17 +16,21 @@ No GitHub authentication required — templates are bundled in the package.
|
|
|
16
16
|
## Usage
|
|
17
17
|
|
|
18
18
|
```
|
|
19
|
-
|
|
19
|
+
npm create ncblock [destination] -- [options]
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
### Options
|
|
23
23
|
|
|
24
|
-
| Flag
|
|
25
|
-
|
|
|
26
|
-
| `--template` / `-t`
|
|
27
|
-
| `--name` / `-n`
|
|
28
|
-
| `--git` / `--no-git`
|
|
29
|
-
| `--install` / `--no-install` | _(interactive)_ | Install dependencies after scaffolding.
|
|
24
|
+
| Flag | Default | Description |
|
|
25
|
+
| ---------------------------- | --------------- | --------------------------------------------------- |
|
|
26
|
+
| `--template` / `-t` | _(interactive)_ | Template to scaffold from. |
|
|
27
|
+
| `--name` / `-n` | template name | Package name for the new project. |
|
|
28
|
+
| `--git` / `--no-git` | _(interactive)_ | Initialize a git repo. |
|
|
29
|
+
| `--install` / `--no-install` | _(interactive)_ | Install dependencies after scaffolding. |
|
|
30
|
+
| `--force` | `false` | Allow overwriting files in an existing destination. |
|
|
31
|
+
| `--collection <id-or-url>` | none | Seed and connect a data source during init. |
|
|
32
|
+
| `--block <id-or-url>` | none | Seed `.notion/target.json` with a block id. |
|
|
33
|
+
| `--local-sdk` | `false` | Use a freshly packed local SDK tarball. |
|
|
30
34
|
|
|
31
35
|
The first positional argument is the destination directory. If omitted, defaults to `./<name>`.
|
|
32
36
|
|
|
@@ -34,13 +38,13 @@ The first positional argument is the destination directory. If omitted, defaults
|
|
|
34
38
|
|
|
35
39
|
```bash
|
|
36
40
|
# Interactive — pick a template, name, etc.
|
|
37
|
-
|
|
41
|
+
npm create ncblock
|
|
38
42
|
|
|
39
43
|
# Non-interactive — scaffold "empty" template into ./my-view
|
|
40
|
-
|
|
44
|
+
npm create ncblock ./my-view -- --template empty --name my-view --no-git --install
|
|
41
45
|
|
|
42
|
-
# Works with
|
|
43
|
-
|
|
46
|
+
# Works with Bun and pnpm too
|
|
47
|
+
bun create ncblock ./my-view --template empty --no-git --no-install
|
|
44
48
|
pnpm create ncblock ./my-view --template empty --no-git --no-install
|
|
45
49
|
```
|
|
46
50
|
|
package/package.json
CHANGED
package/scripts/init.ts
CHANGED
|
@@ -55,7 +55,7 @@ function writeInitialTarget(
|
|
|
55
55
|
/**
|
|
56
56
|
* Run the locally-installed `ncblock` CLI from a scaffolded project.
|
|
57
57
|
*
|
|
58
|
-
* We bypass
|
|
58
|
+
* We bypass package-manager exec wrappers deliberately: those wrappers can
|
|
59
59
|
* spawn the binary in a way that lets `execSync` return before the child's
|
|
60
60
|
* stdout fully drains, which makes pull-manifest's output land out of order
|
|
61
61
|
* (e.g. after init has already exited). Invoking the .js entrypoint via
|
|
@@ -612,7 +612,7 @@ async function main() {
|
|
|
612
612
|
const useLocalSdk = args.localSdk === true
|
|
613
613
|
// Dynamic import: `pack-local-sdk` depends on `build-sdk`, which is not
|
|
614
614
|
// bundled into the published `create-ncblock` package. Resolving it
|
|
615
|
-
// statically here would crash
|
|
615
|
+
// statically here would crash the published package.
|
|
616
616
|
const sdkDep = useLocalSdk
|
|
617
617
|
? (await import("./utils/pack-local-sdk")).packLocalSdk(dest)
|
|
618
618
|
: undefined
|
package/sdk-version.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.0.
|
|
1
|
+
{"version":"0.0.24"}
|