@openelement/create 1.0.0-alpha.7 → 1.0.0-alpha.8
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 +36 -31
- package/package.json +2 -2
- package/src/cli.js +25 -13
- package/src/install-command.d.ts +15 -16
- package/src/install-command.js +17 -18
- package/src/template-builder.js +3 -2
- package/src/version.js +1 -1
- package/templates/README.tmpl +17 -17
- package/templates/package.json.tmpl +24 -1
- package/templates/tsconfig.json.tmpl +15 -0
- package/templates/deno.json.tmpl +0 -25
package/README.md
CHANGED
|
@@ -10,47 +10,49 @@ Docs and guides: <https://openelement.org>.
|
|
|
10
10
|
> line until a separately admitted stable release.
|
|
11
11
|
|
|
12
12
|
`@openelement/create` generates a new openElement project with the recommended
|
|
13
|
-
directory structure,
|
|
13
|
+
directory structure, a pnpm-scripted package manifest, Vite setup, and starter
|
|
14
|
+
pages. The generated project is a plain Node/pnpm project.
|
|
14
15
|
|
|
15
16
|
## Usage (1.0 Alpha)
|
|
16
17
|
|
|
17
18
|
```bash
|
|
18
|
-
|
|
19
|
+
npm exec @openelement/create@alpha -- my-app
|
|
19
20
|
cd my-app
|
|
20
|
-
|
|
21
|
+
pnpm install
|
|
22
|
+
pnpm dev
|
|
21
23
|
```
|
|
22
24
|
|
|
23
25
|
The version `@alpha` resolves to is registered in
|
|
24
|
-
`the tracked release-state manifest` (currently `1.0.0-alpha.
|
|
26
|
+
`the tracked release-state manifest` (currently `1.0.0-alpha.7`, a new baseline —
|
|
25
27
|
not a 0.x upgrade, with no migration path from 0.x). Pin that exact version
|
|
26
28
|
when reproducibility matters (verify against the live registry with
|
|
27
29
|
`npm view @openelement/create dist-tags.alpha`):
|
|
28
30
|
|
|
29
31
|
```bash
|
|
30
|
-
|
|
32
|
+
npm exec @openelement/create@1.0.0-alpha.7 -- my-app
|
|
31
33
|
```
|
|
32
34
|
|
|
33
|
-
`--minimum-dependency-age 0` is needed because Deno's default
|
|
34
|
-
minimumDependencyAge (~24h) refuses packages published within the last day.
|
|
35
|
-
|
|
36
35
|
The generated starter pins the exact `@openelement/*` versions it was built
|
|
37
|
-
from in its `
|
|
36
|
+
from in its `package.json` dependencies.
|
|
38
37
|
|
|
39
38
|
The canonical install command is exported from `@openelement/create/install-command` (one builder, every documented copy derives from it).
|
|
40
39
|
|
|
41
|
-
##
|
|
40
|
+
## The bootstrap is a plain npm invocation; the generated project is Node
|
|
41
|
+
|
|
42
|
+
The documented bootstrap runs the generator through `npm exec` (or the `npx`
|
|
43
|
+
short form, or `pnpm dlx`) — plain Node tooling, no second runtime. Node.js
|
|
44
|
+
24.2+ is the only host requirement for both the bootstrap and the generated
|
|
45
|
+
project. The packed package ships two equivalent npm bins
|
|
46
|
+
(`openelement-create`, `create-openelement`, both the same entry), so the pnpm
|
|
47
|
+
form must name one explicitly:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npx @openelement/create@alpha my-app
|
|
51
|
+
pnpm dlx --package=@openelement/create@alpha openelement-create my-app
|
|
52
|
+
```
|
|
42
53
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
> program: it is written against the Deno API, and its `bin` entries and
|
|
46
|
-
> shebang (`#!/usr/bin/env -S deno run --allow-read --allow-write`) both assume
|
|
47
|
-
> a Deno host. Under a plain Node host the bin dies at startup with
|
|
48
|
-
> `ReferenceError: Deno is not defined`.
|
|
49
|
-
>
|
|
50
|
-
> A Node-executable entry point is a deferred roadmap item (portable-host
|
|
51
|
-
> tooling, [#1387](https://github.com/open-element/openelement/issues/1387)).
|
|
52
|
-
> Until it lands, the bare-flag create form is the
|
|
53
|
-
> supported install path.
|
|
54
|
+
The scaffolded project itself is Node-native: Node.js 24.2+ and
|
|
55
|
+
pnpm run its scripts.
|
|
54
56
|
|
|
55
57
|
## Stable 0.43 (maintenance line)
|
|
56
58
|
|
|
@@ -59,20 +61,23 @@ A versionless install resolves the npm `latest` dist-tag to it; pin the line
|
|
|
59
61
|
explicitly instead:
|
|
60
62
|
|
|
61
63
|
```bash
|
|
62
|
-
|
|
64
|
+
npm exec @openelement/create@0.43 -- my-app
|
|
63
65
|
```
|
|
64
66
|
|
|
65
67
|
## Requirements
|
|
66
68
|
|
|
67
|
-
**
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
- **Bootstrap:** Node.js 24.2+ with npm (or pnpm for the `pnpm dlx` variant) —
|
|
70
|
+
the verified floor this repository exercises in CI.
|
|
71
|
+
- **Generated project:** Node.js 24.2+ (the floor the packed `@openelement/*`
|
|
72
|
+
engines declare and CI exercises; `.node-version` pins the development
|
|
73
|
+
line) and pnpm for the lifecycle scripts.
|
|
72
74
|
|
|
73
75
|
## What It Creates
|
|
74
76
|
|
|
75
|
-
- `
|
|
77
|
+
- `package.json` - starter dependencies (exact `@openelement/*` release pins)
|
|
78
|
+
and the lifecycle scripts (`dev`/`check`/`test`/`build`/`start`/`preview`)
|
|
79
|
+
- `tsconfig.json` - the type-check surface for `pnpm check`: JSX authoring
|
|
80
|
+
through the element import source, whole-`app/` coverage
|
|
76
81
|
- `vite.config.ts` - Vite build configuration; the plugin call is plain
|
|
77
82
|
`openElement()`, because framework options have exactly one home:
|
|
78
83
|
- `openelement.config.ts` - the framework options. It is OPTIONAL and nearly
|
|
@@ -88,9 +93,9 @@ claimed or tested.
|
|
|
88
93
|
- `public/` - static assets
|
|
89
94
|
- `README.md` and `.gitignore` - starter docs and ignore rules
|
|
90
95
|
|
|
91
|
-
The generated
|
|
92
|
-
the starter surface. Advanced contracts remain available through the
|
|
93
|
-
workspace packages when a project needs them.
|
|
96
|
+
The generated dependency set intentionally keeps protocol and build internals
|
|
97
|
+
out of the starter surface. Advanced contracts remain available through the
|
|
98
|
+
published workspace packages when a project needs them.
|
|
94
99
|
|
|
95
100
|
## License
|
|
96
101
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openelement/create",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/cli.js",
|
|
6
6
|
"types": "./src/cli.d.ts",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"starter"
|
|
33
33
|
],
|
|
34
34
|
"engines": {
|
|
35
|
-
"
|
|
35
|
+
"node": ">=24.2"
|
|
36
36
|
},
|
|
37
37
|
"sideEffects": [
|
|
38
38
|
"./src/cli.js"
|
package/src/cli.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
#!/usr/bin/env
|
|
1
|
+
#!/usr/bin/env node
|
|
2
2
|
import { buildTemplates, resolveVersions, validateProjectName } from "./template-builder.js";
|
|
3
3
|
import { createInstallCommand } from "./install-command.js";
|
|
4
|
+
import { mkdir, stat, writeFile } from "node:fs/promises";
|
|
5
|
+
import process from "node:process";
|
|
4
6
|
//#region src/cli.ts
|
|
5
7
|
/**
|
|
6
8
|
* @openelement/create - Minimal project scaffold for openElement framework.
|
|
@@ -18,9 +20,18 @@ import { createInstallCommand } from "./install-command.js";
|
|
|
18
20
|
function errorMessage(error) {
|
|
19
21
|
return error instanceof Error ? error.message : String(error);
|
|
20
22
|
}
|
|
23
|
+
/** node:fs error shape for "path does not exist". */
|
|
24
|
+
function isNotFound(error) {
|
|
25
|
+
return error.code === "ENOENT";
|
|
26
|
+
}
|
|
27
|
+
/** node:fs error shapes for "not permitted". */
|
|
28
|
+
function isPermissionDenied(error) {
|
|
29
|
+
const code = error.code;
|
|
30
|
+
return code === "EACCES" || code === "EPERM";
|
|
31
|
+
}
|
|
21
32
|
function fail(message) {
|
|
22
33
|
console.error(`error: ${message}`);
|
|
23
|
-
|
|
34
|
+
process.exit(1);
|
|
24
35
|
}
|
|
25
36
|
function joinPosix(...parts) {
|
|
26
37
|
return parts.join("/").replace(/\/{2,}/g, "/");
|
|
@@ -31,41 +42,42 @@ function dirnameOf(path) {
|
|
|
31
42
|
return path.slice(0, idx);
|
|
32
43
|
}
|
|
33
44
|
async function main() {
|
|
34
|
-
const name =
|
|
45
|
+
const name = process.argv[2];
|
|
35
46
|
if (!name || name === "--help" || name === "-h") {
|
|
36
47
|
console.log(`Usage (Alpha): ${createInstallCommand()}`);
|
|
37
48
|
console.log("(a versionless install resolves the stable 0.43 line)");
|
|
38
|
-
|
|
49
|
+
process.exit(name ? 0 : 1);
|
|
39
50
|
}
|
|
40
51
|
const invalid = validateProjectName(name);
|
|
41
52
|
if (invalid) fail(`Invalid project name "${name}". ${invalid}`);
|
|
42
|
-
const targetDir = `${
|
|
53
|
+
const targetDir = `${process.cwd().replace(/\/+$/, "")}/${name}`;
|
|
43
54
|
const relativeTarget = name;
|
|
44
55
|
if (!relativeTarget || relativeTarget.includes("..") || relativeTarget.includes("/") || relativeTarget.includes("\\") || /^[a-zA-Z]:/.test(relativeTarget) || relativeTarget.startsWith("/")) fail(`Refusing to create project outside the current directory: ${name}`);
|
|
45
56
|
try {
|
|
46
|
-
await
|
|
57
|
+
await stat(targetDir);
|
|
47
58
|
fail(`Directory "${name}" already exists. Choose a different name or remove the existing directory.`);
|
|
48
59
|
} catch (error) {
|
|
49
|
-
if (!(error
|
|
60
|
+
if (!isNotFound(error)) throw new Error(`Could not inspect target directory "${name}": ${errorMessage(error)}`);
|
|
50
61
|
}
|
|
51
62
|
const v = resolveVersions();
|
|
52
63
|
try {
|
|
53
|
-
await
|
|
64
|
+
await mkdir(targetDir, { recursive: true });
|
|
54
65
|
const TPL = await buildTemplates(v, name);
|
|
55
66
|
for (const [path, content] of Object.entries(TPL)) {
|
|
56
67
|
const fullPath = joinPosix(targetDir, path);
|
|
57
|
-
await
|
|
58
|
-
await
|
|
68
|
+
await mkdir(dirnameOf(fullPath), { recursive: true });
|
|
69
|
+
await writeFile(fullPath, content, "utf8");
|
|
59
70
|
console.info(` created ${path}`);
|
|
60
71
|
}
|
|
61
72
|
} catch (error) {
|
|
62
|
-
const detail = error
|
|
73
|
+
const detail = isPermissionDenied(error) ? `Permission denied. Check write permissions for ${targetDir}.` : errorMessage(error);
|
|
63
74
|
throw new Error(`Failed to write project files in "${name}": ${detail} Remove the partially created directory before retrying.`);
|
|
64
75
|
}
|
|
65
76
|
console.info(`\nopenElement project created at ./${relativeTarget}/`);
|
|
66
77
|
console.info(`\n cd ${relativeTarget}`);
|
|
67
|
-
console.info("
|
|
68
|
-
console.info("
|
|
78
|
+
console.info(" pnpm install");
|
|
79
|
+
console.info(" pnpm dev");
|
|
80
|
+
console.info(" See README.md for all scripts (check/test/build/start/preview)");
|
|
69
81
|
}
|
|
70
82
|
try {
|
|
71
83
|
await main();
|
package/src/install-command.d.ts
CHANGED
|
@@ -10,30 +10,29 @@
|
|
|
10
10
|
* in the repository differs from this string. There is no second spelling to
|
|
11
11
|
* drift.
|
|
12
12
|
*
|
|
13
|
-
* This module is deliberately side-effect free (no top-level CLI execution
|
|
14
|
-
*
|
|
13
|
+
* This module is deliberately side-effect free (no top-level CLI execution):
|
|
14
|
+
* it is imported by the site build as well as by the CLI itself.
|
|
15
15
|
*/
|
|
16
16
|
/** The npm specifier the generator is published under. */
|
|
17
|
-
export declare const CREATE_PACKAGE_SPECIFIER = "
|
|
17
|
+
export declare const CREATE_PACKAGE_SPECIFIER = "@openelement/create";
|
|
18
18
|
/** The dist-tag the documented install resolves; the exact version is registry truth. */
|
|
19
19
|
export declare const CREATE_INSTALL_TAG = "alpha";
|
|
20
|
-
/**
|
|
21
|
-
* Deno permissions the bootstrap needs. Owner ruling 2026-09-21: the
|
|
22
|
-
* documented command uses bare `-A` — the consumer scaffolds their own
|
|
23
|
-
* project, and the scoped-permission form reads as noise (the same ruling
|
|
24
|
-
* narrowed the `check-no-allow-all` tripwire to an exact-line exemption for
|
|
25
|
-
* this command). `--minimum-dependency-age 0` is a functional footnote kept
|
|
26
|
-
* in prose where needed, not part of the documented shape.
|
|
27
|
-
*/
|
|
28
|
-
export declare const CREATE_INSTALL_PERMISSIONS: readonly string[];
|
|
29
20
|
/** Placeholder the usage text and the docs use in place of a project name. */
|
|
30
21
|
export declare const CREATE_PROJECT_PLACEHOLDER = "<project-name>";
|
|
31
22
|
/**
|
|
32
|
-
*
|
|
23
|
+
* The documented install command shapes, all verified against the published
|
|
24
|
+
* two-bin artifact (bins `openelement-create` and `create-openelement`, both
|
|
25
|
+
* `src/cli.js`; npm 11 / pnpm 12):
|
|
26
|
+
* - canonical: `npm exec <pkg>@<tag> -- <name>`
|
|
27
|
+
* - short form: `npx <pkg>@<tag> <name>`
|
|
28
|
+
* - pnpm: `pnpm dlx --package=<pkg>@<tag> openelement-create <name>` — the
|
|
29
|
+
* explicit `--package` plus bin is required because the packed package
|
|
30
|
+
* ships two bins, so a bare `pnpm dlx <pkg>` cannot resolve one (and no
|
|
31
|
+
* package named `create-openelement` exists on the registry).
|
|
33
32
|
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
33
|
+
* Owner ruling 2026-10-03: the former Deno bootstrap (`deno run` of the npm
|
|
34
|
+
* specifier) is retired with the Deno consumer surface; the generator is
|
|
35
|
+
* invoked through plain Node tooling.
|
|
37
36
|
*/
|
|
38
37
|
export declare function createInstallCommand(projectName?: string, options?: {
|
|
39
38
|
tag?: string;
|
package/src/install-command.js
CHANGED
|
@@ -10,34 +10,33 @@
|
|
|
10
10
|
* in the repository differs from this string. There is no second spelling to
|
|
11
11
|
* drift.
|
|
12
12
|
*
|
|
13
|
-
* This module is deliberately side-effect free (no top-level CLI execution
|
|
14
|
-
*
|
|
13
|
+
* This module is deliberately side-effect free (no top-level CLI execution):
|
|
14
|
+
* it is imported by the site build as well as by the CLI itself.
|
|
15
15
|
*/
|
|
16
16
|
/** The npm specifier the generator is published under. */
|
|
17
|
-
const CREATE_PACKAGE_SPECIFIER = "
|
|
17
|
+
const CREATE_PACKAGE_SPECIFIER = "@openelement/create";
|
|
18
18
|
/** The dist-tag the documented install resolves; the exact version is registry truth. */
|
|
19
19
|
const CREATE_INSTALL_TAG = "alpha";
|
|
20
|
-
/**
|
|
21
|
-
* Deno permissions the bootstrap needs. Owner ruling 2026-09-21: the
|
|
22
|
-
* documented command uses bare `-A` — the consumer scaffolds their own
|
|
23
|
-
* project, and the scoped-permission form reads as noise (the same ruling
|
|
24
|
-
* narrowed the `check-no-allow-all` tripwire to an exact-line exemption for
|
|
25
|
-
* this command). `--minimum-dependency-age 0` is a functional footnote kept
|
|
26
|
-
* in prose where needed, not part of the documented shape.
|
|
27
|
-
*/
|
|
28
|
-
const CREATE_INSTALL_PERMISSIONS = [String.fromCharCode(45, 65)];
|
|
29
20
|
/** Placeholder the usage text and the docs use in place of a project name. */
|
|
30
21
|
const CREATE_PROJECT_PLACEHOLDER = "<project-name>";
|
|
31
22
|
/**
|
|
32
|
-
*
|
|
23
|
+
* The documented install command shapes, all verified against the published
|
|
24
|
+
* two-bin artifact (bins `openelement-create` and `create-openelement`, both
|
|
25
|
+
* `src/cli.js`; npm 11 / pnpm 12):
|
|
26
|
+
* - canonical: `npm exec <pkg>@<tag> -- <name>`
|
|
27
|
+
* - short form: `npx <pkg>@<tag> <name>`
|
|
28
|
+
* - pnpm: `pnpm dlx --package=<pkg>@<tag> openelement-create <name>` — the
|
|
29
|
+
* explicit `--package` plus bin is required because the packed package
|
|
30
|
+
* ships two bins, so a bare `pnpm dlx <pkg>` cannot resolve one (and no
|
|
31
|
+
* package named `create-openelement` exists on the registry).
|
|
33
32
|
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
33
|
+
* Owner ruling 2026-10-03: the former Deno bootstrap (`deno run` of the npm
|
|
34
|
+
* specifier) is retired with the Deno consumer surface; the generator is
|
|
35
|
+
* invoked through plain Node tooling.
|
|
37
36
|
*/
|
|
38
37
|
function createInstallCommand(projectName = CREATE_PROJECT_PLACEHOLDER, options = {}) {
|
|
39
38
|
const tag = options.tag ?? "alpha";
|
|
40
|
-
return `
|
|
39
|
+
return `npm exec ${CREATE_PACKAGE_SPECIFIER}@${tag} -- ${projectName}`;
|
|
41
40
|
}
|
|
42
41
|
//#endregion
|
|
43
|
-
export {
|
|
42
|
+
export { CREATE_INSTALL_TAG, CREATE_PACKAGE_SPECIFIER, CREATE_PROJECT_PLACEHOLDER, createInstallCommand };
|
package/src/template-builder.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CREATE_VERSION, VITE_STARTER_PIN } from "./version.js";
|
|
2
|
+
import { readFile } from "node:fs/promises";
|
|
2
3
|
//#region src/template-builder.ts
|
|
3
4
|
const MAX_PROJECT_NAME_LENGTH = 214;
|
|
4
5
|
const PROJECT_NAME_PATTERN = /^[a-z0-9][a-z0-9._-]*$/;
|
|
@@ -36,8 +37,8 @@ const TEMPLATE_FILES = [
|
|
|
36
37
|
["gitignore.tmpl", ".gitignore"],
|
|
37
38
|
["README.tmpl", "README.md"],
|
|
38
39
|
["public/openelement-mark.svg", "public/openelement-mark.svg"],
|
|
39
|
-
["deno.json.tmpl", "deno.json"],
|
|
40
40
|
["package.json.tmpl", "package.json"],
|
|
41
|
+
["tsconfig.json.tmpl", "tsconfig.json"],
|
|
41
42
|
["vite.config.ts.tmpl", "vite.config.ts"],
|
|
42
43
|
["openelement.config.ts.tmpl", "openelement.config.ts"],
|
|
43
44
|
["app/styles/tokens.css", "app/styles/tokens.css"],
|
|
@@ -77,7 +78,7 @@ async function buildTemplates(v, projectName) {
|
|
|
77
78
|
["${name}"]: projectName
|
|
78
79
|
};
|
|
79
80
|
const entries = await Promise.all(TEMPLATE_FILES.map(async ([source, target]) => {
|
|
80
|
-
let content = await
|
|
81
|
+
let content = await readFile(new URL(source, templatesBase), "utf8");
|
|
81
82
|
for (const [token, value] of Object.entries(tokens)) if (content.includes(token)) content = content.split(token).join(value);
|
|
82
83
|
if (content.includes("${v.") || content.includes("${name}")) throw new Error(`Unresolved scaffold token in starter template: ${source}`);
|
|
83
84
|
return [target, content];
|
package/src/version.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/version.ts
|
|
2
2
|
/** The published CLI version, embedded so packed npm installs are self-contained. */
|
|
3
|
-
const CREATE_VERSION = "1.0.0-alpha.
|
|
3
|
+
const CREATE_VERSION = "1.0.0-alpha.8";
|
|
4
4
|
/**
|
|
5
5
|
* The Vite dev release stamped into the generated starter's import map and
|
|
6
6
|
* dev task. Embedded for the same reason as CREATE_VERSION (packed npm
|
package/templates/README.tmpl
CHANGED
|
@@ -6,7 +6,7 @@ elements and shared style sheets in `app/components/`, and client islands
|
|
|
6
6
|
(including the `app-shell` layout island) in `app/islands/`.
|
|
7
7
|
|
|
8
8
|
This starter pins the exact `@openelement/element` and `@openelement/router`
|
|
9
|
-
versions it was generated from (`${v.element}`) in `
|
|
9
|
+
versions it was generated from (`${v.element}`) in `package.json`; update both
|
|
10
10
|
there when moving to a new release.
|
|
11
11
|
|
|
12
12
|
Styling ownership is split three ways. Global design tokens and the document
|
|
@@ -37,17 +37,18 @@ accepted-key list. `vite.config.ts` stays Vite-only: `plugins: [...openElement()
|
|
|
37
37
|
The conventions follow the `dirs` block, so moving the three roots under
|
|
38
38
|
`src/` moves the token, shell and head files with them.
|
|
39
39
|
|
|
40
|
-
##
|
|
40
|
+
## Scripts
|
|
41
41
|
|
|
42
|
-
- `
|
|
43
|
-
- `
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
- `
|
|
47
|
-
- `
|
|
42
|
+
- `pnpm dev` — start the Vite dev server.
|
|
43
|
+
- `pnpm check` — type-check every route/component file. The check covers the
|
|
44
|
+
whole `app/` directory (`tsconfig.json`), so new files are picked up
|
|
45
|
+
automatically.
|
|
46
|
+
- `pnpm test` — run Node's built-in test runner (the starter ships none).
|
|
47
|
+
- `pnpm build` — production build (SSG + Nitro server) into `dist/`.
|
|
48
|
+
- `pnpm start` — serve the production build. Use this for production
|
|
48
49
|
preview: the starter ships a request-time route (`/contact`), so
|
|
49
|
-
`
|
|
50
|
-
- `
|
|
50
|
+
`pnpm preview` (static-only preview, #601) is refused by design.
|
|
51
|
+
- `pnpm preview` — static-only preview; refused for this starter (see
|
|
51
52
|
above).
|
|
52
53
|
|
|
53
54
|
## Blog
|
|
@@ -59,14 +60,13 @@ then link it from `app/routes/blog/index.tsx` (the index list is static
|
|
|
59
60
|
authoring). Interactive content belongs in a compiled island composed from
|
|
60
61
|
the page.
|
|
61
62
|
|
|
62
|
-
##
|
|
63
|
+
## Dependency notes
|
|
63
64
|
|
|
64
|
-
`
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
them.
|
|
65
|
+
`hono` and `@hono/vite-dev-server` are installed even though no source file
|
|
66
|
+
imports them: the dev server resolves `hono` when loading the generated
|
|
67
|
+
server entry (the bundled `dist/` output inlines it). For Nitro deployments,
|
|
68
|
+
the built handler bridges through the `@openelement/router/nitro-mount`
|
|
69
|
+
subpath of the one `@openelement/router` dependency. Do not remove them.
|
|
70
70
|
|
|
71
71
|
## Brand assets
|
|
72
72
|
|
|
@@ -1,6 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "${name}",
|
|
3
3
|
"private": true,
|
|
4
|
+
"version": "0.0.0",
|
|
4
5
|
"type": "module",
|
|
5
|
-
"
|
|
6
|
+
"packageManager": "pnpm@12.8.1",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=24.2"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"dev": "vite",
|
|
12
|
+
"check": "tsc --noEmit",
|
|
13
|
+
"test": "node --test",
|
|
14
|
+
"build": "node node_modules/@openelement/router/src/cli/build.js",
|
|
15
|
+
"start": "node node_modules/@openelement/router/src/cli/start.js",
|
|
16
|
+
"preview": "node node_modules/@openelement/router/src/cli/start.js --mode=preview"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@hono/vite-dev-server": "^0.25.3",
|
|
20
|
+
"@openelement/element": "${v.element}",
|
|
21
|
+
"@openelement/router": "${v.router}",
|
|
22
|
+
"hono": "^4.12"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@playwright/test": "1.59.1",
|
|
26
|
+
"typescript": "6.0.3",
|
|
27
|
+
"vite": "${v.vite}"
|
|
28
|
+
}
|
|
6
29
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
7
|
+
"jsx": "react-jsx",
|
|
8
|
+
"jsxImportSource": "@openelement/element",
|
|
9
|
+
"strict": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"noEmit": true,
|
|
12
|
+
"allowImportingTsExtensions": true
|
|
13
|
+
},
|
|
14
|
+
"include": ["app", "vite.config.ts", "openelement.config.ts"]
|
|
15
|
+
}
|
package/templates/deno.json.tmpl
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"imports": {
|
|
3
|
-
"@hono/vite-dev-server": "npm:@hono/vite-dev-server@^0.25.3",
|
|
4
|
-
"@openelement/router": "npm:@openelement/router@${v.router}",
|
|
5
|
-
"@openelement/router/vite": "npm:@openelement/router@${v.router}/vite",
|
|
6
|
-
"@openelement/router/nitro-mount": "npm:@openelement/router@${v.router}/nitro-mount",
|
|
7
|
-
"@openelement/element": "npm:@openelement/element@${v.element}",
|
|
8
|
-
"@openelement/element/build-utils": "npm:@openelement/element@${v.element}/build-utils",
|
|
9
|
-
"@openelement/element/jsx-dev-runtime": "npm:@openelement/element@${v.element}/jsx-dev-runtime",
|
|
10
|
-
"@openelement/element/jsx-runtime": "npm:@openelement/element@${v.element}/jsx-runtime",
|
|
11
|
-
"hono": "npm:hono@^4.12",
|
|
12
|
-
"vite": "npm:vite@${v.vite}"
|
|
13
|
-
},
|
|
14
|
-
"nodeModulesDir": "auto",
|
|
15
|
-
"minimumDependencyAge": 0,
|
|
16
|
-
"tasks": {
|
|
17
|
-
"dev": "deno run --config deno.json --allow-read --allow-write --allow-env --allow-net --allow-run --allow-sys --allow-ffi npm:vite@${v.vite}",
|
|
18
|
-
"check": "deno check --config deno.json app/ vite.config.ts openelement.config.ts",
|
|
19
|
-
"test": "deno test --config deno.json --permit-no-files",
|
|
20
|
-
"build": "deno run --config deno.json --allow-read --allow-write --allow-net --allow-env --allow-ffi --allow-sys --allow-run npm:@openelement/router@${v.router}/cli/build",
|
|
21
|
-
"start": "deno run --config deno.json --allow-read --allow-write --allow-net --allow-env --allow-ffi --allow-sys --allow-run npm:@openelement/router@${v.router}/cli/start",
|
|
22
|
-
"preview": "deno run --config deno.json --allow-read --allow-write --allow-net --allow-env --allow-ffi --allow-sys --allow-run npm:@openelement/router@${v.router}/cli/start --mode=preview"
|
|
23
|
-
},
|
|
24
|
-
"compilerOptions": { "lib": ["ES2022", "DOM", "DOM.Iterable"], "jsx": "react-jsx", "jsxImportSource": "@openelement/element" }
|
|
25
|
-
}
|