shipstatic 1.1.0 → 1.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 +55 -19
- package/package.json +6 -2
package/README.md
CHANGED
|
@@ -1,50 +1,86 @@
|
|
|
1
1
|
# shipstatic
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**The package you're looking for is [`@shipstatic/ship`](https://www.npmjs.com/package/@shipstatic/ship).** That's where the code lives, and where the full documentation is.
|
|
4
|
+
|
|
5
|
+
This package is an alias for it. It exists as an escape hatch: people and agents reach for the unscoped name first, and a good guess shouldn't dead-end in a 404.
|
|
6
|
+
|
|
7
|
+
**Use this one directly — there's nothing to switch to.** `npx shipstatic ./dist` runs the same binary as `npx @shipstatic/ship ./dist`, and `import Ship from 'shipstatic'` resolves to the same module as `import Ship from '@shipstatic/ship'`. Not a redirect, not a shim with its own behaviour — the same package under a shorter name. If you've read this far and you're about to type `npx`, just type it.
|
|
4
8
|
|
|
5
9
|
## Deploy in seconds — no install, no account
|
|
6
10
|
|
|
11
|
+
Put a static site, landing page, or prototype online:
|
|
12
|
+
|
|
7
13
|
```bash
|
|
8
14
|
npx shipstatic ./dist
|
|
9
15
|
```
|
|
10
16
|
|
|
11
17
|
That's it. Your site is live on `*.shipstatic.com`. No sign-up, no config, no global install. Got Node? You're ready.
|
|
12
18
|
|
|
13
|
-
|
|
19
|
+
A single file works the same way:
|
|
14
20
|
|
|
15
|
-
```
|
|
16
|
-
|
|
21
|
+
```bash
|
|
22
|
+
npx shipstatic ./index.html
|
|
23
|
+
```
|
|
17
24
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
25
|
+
**What comes back:** the live URL, plus a **claim URL** — visit it to keep the site permanently. Anonymous deployments are **public** and **expire in 3 days**.
|
|
26
|
+
|
|
27
|
+
## Password-protect a deployment
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npx shipstatic ./dist --password "correct-horse-battery-staple"
|
|
22
31
|
```
|
|
23
32
|
|
|
24
|
-
|
|
33
|
+
Visitors are prompted before the site is served. Works on a single file too:
|
|
25
34
|
|
|
26
35
|
```bash
|
|
27
|
-
|
|
36
|
+
npx shipstatic ./index.html --password "correct-horse-battery-staple"
|
|
28
37
|
```
|
|
29
38
|
|
|
30
|
-
|
|
39
|
+
The password can also come from the environment, which keeps it out of your shell history and CI logs:
|
|
31
40
|
|
|
32
|
-
|
|
41
|
+
```bash
|
|
42
|
+
SHIP_PASSWORD="correct-horse-battery-staple" npx shipstatic ./dist
|
|
43
|
+
```
|
|
33
44
|
|
|
34
|
-
|
|
45
|
+
## For scripts and agents
|
|
35
46
|
|
|
36
|
-
|
|
47
|
+
Add `--json` to any command for machine-readable output — on success **and** on failure:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npx shipstatic ./dist --json
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
- **Exit code** is `0` on success, non-zero on failure — branch on it, not on the text.
|
|
54
|
+
- **Errors** are JSON too under `--json`, carrying a stable `error` type and `status`. Branch on those, never on the message string.
|
|
55
|
+
- **`--no-color`** is honoured, and colour is disabled automatically when output is not a TTY.
|
|
56
|
+
- **`SHIP_PASSWORD`** sets `--password` from the environment.
|
|
57
|
+
|
|
58
|
+
Deploying anonymously needs no credentials at all — which is what makes `npx shipstatic ./dist` safe to run in a sandbox with no secrets configured. Just remember such deployments are public and expire in 3 days; the claim URL in the output is how they become permanent.
|
|
59
|
+
|
|
60
|
+
## Install (optional, for repeat use)
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
npm install -g shipstatic # global CLI — provides the `ship` command
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
> The command is **`ship`**, matching `@shipstatic/ship` exactly. As a project dependency: `npm install shipstatic`.
|
|
67
|
+
|
|
68
|
+
## Use it as an SDK
|
|
37
69
|
|
|
38
70
|
```javascript
|
|
39
|
-
import Ship from 'shipstatic';
|
|
40
|
-
|
|
71
|
+
import Ship from 'shipstatic';
|
|
72
|
+
|
|
73
|
+
const ship = new Ship();
|
|
74
|
+
const result = await ship.deploy('./dist');
|
|
75
|
+
// result.deployment → live URL
|
|
76
|
+
// result.claim → visit to keep permanently
|
|
41
77
|
```
|
|
42
78
|
|
|
43
|
-
##
|
|
79
|
+
## Everything else
|
|
44
80
|
|
|
45
|
-
|
|
81
|
+
Custom domains, API keys, deploy tokens, deployment management, the full SDK reference — all documented once, in **[`@shipstatic/ship`](https://www.npmjs.com/package/@shipstatic/ship)**.
|
|
46
82
|
|
|
47
|
-
This README
|
|
83
|
+
This README covers only the quickstart, deliberately. A copy of another package's documentation is a second copy to keep true — and the day it stops being true, it's worse than none.
|
|
48
84
|
|
|
49
85
|
## License
|
|
50
86
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shipstatic",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "CLI and SDK for ShipStatic — deploy static websites, landing pages, and prototypes instantly. The unscoped name for @shipstatic/ship.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"shipstatic",
|
|
@@ -69,5 +69,9 @@
|
|
|
69
69
|
"@biomejs/biome": "2.5.5",
|
|
70
70
|
"publint": "^0.3.12",
|
|
71
71
|
"vitest": "^4.1.10"
|
|
72
|
-
}
|
|
72
|
+
},
|
|
73
|
+
"bugs": {
|
|
74
|
+
"url": "https://github.com/shipstatic/ship/issues"
|
|
75
|
+
},
|
|
76
|
+
"author": "ShipStatic"
|
|
73
77
|
}
|