htmlship 0.3.0 → 0.3.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/README.md +10 -4
- package/dist/cli.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -18,15 +18,21 @@ npx htmlship list-mine
|
|
|
18
18
|
|
|
19
19
|
## Deploy built apps
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
`deploy` builds a frontend project **locally** and ships the compiled output. Single-page apps (Vite, CRA, …) are inlined into one self-contained page; multi-file sites (Next.js — auto-detected — Astro, Docusaurus, …) are hosted as a file tree at `view.htmlship.com/{slug}/`.
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
npx htmlship deploy ./my-app
|
|
25
|
-
npx htmlship deploy
|
|
24
|
+
npx htmlship deploy ./my-app # SPA -> one inlined page
|
|
25
|
+
npx htmlship deploy ./my-next-app # Next.js -> multi-file site (auto-detected)
|
|
26
|
+
npx htmlship deploy ./my-app --site --out dist # force multi-file hosting (Astro, etc.)
|
|
27
|
+
npx htmlship deploy ./my-app --single-file # force single-file inlining
|
|
28
|
+
npx htmlship deploy ./my-app --password "demo-pass" # password-protect the deploy
|
|
29
|
+
npx htmlship deploy --dry-run # build, but don't publish
|
|
26
30
|
npx htmlship deploy --build-cmd "vite build" --out dist
|
|
27
31
|
```
|
|
28
32
|
|
|
29
|
-
The build runs **locally on your machine** (npm/pnpm/yarn/bun, auto-detected) — never on the server.
|
|
33
|
+
The build always runs **locally on your machine** (npm/pnpm/yarn/bun, auto-detected) — never on the server. Either way the result renders in its own isolated, opaque origin (no cookies, no same-origin access, no network egress, no `eval`) via a sandboxed CSP; single-file pages and site trees are both capped at 10 MB.
|
|
34
|
+
|
|
35
|
+
For Next.js the CLI builds a static export based at the slug path automatically (no `next.config` edits) as long as the app is statically exportable — no middleware/SSR; a `next.config.ts` is the one case you configure by hand (the CLI tells you how). For other frameworks, `--site` ships any static build; set your framework's base path to `/__htmlship_base__` so assets resolve under `/{slug}/`. The same flow is available to agents through the `deploy_project` MCP tool.
|
|
30
36
|
|
|
31
37
|
## MCP server
|
|
32
38
|
|
package/dist/cli.js
CHANGED