@shiplane/github-pages 0.0.0-stage โ 0.6.0-nightly.12
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/LICENSE +21 -0
- package/README.md +134 -2
- package/dist/index.d.ts +13 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/package.json +58 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Arnaud Zheng
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,135 @@
|
|
|
1
|
-
#
|
|
1
|
+
# ๐ @shiplane/github-pages
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Ships a static site to GitHub Pages: fills
|
|
4
|
+
[shiplane](https://github.com/arnaud-zg/packages/blob/main/packages/shiplane/README.md)'s **static
|
|
5
|
+
hosting** port. Preview and production share one branch, and neither removes the other.
|
|
6
|
+
|
|
7
|
+
```mermaid
|
|
8
|
+
flowchart LR
|
|
9
|
+
CFG["shiplane.config.ts"] --> MOD["webApp"]
|
|
10
|
+
MOD --> GH["githubPagesStaticHosting()"]
|
|
11
|
+
GH --> BUILD["build with BASE_PATH"]
|
|
12
|
+
BUILD --> PRE["preview: /preview/"]
|
|
13
|
+
BUILD --> PROD["production: the rest of the branch"]
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## โก Install
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
pnpm add -D shiplane @shiplane/github-pages
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Then, once, after the first ship: **Settings โบ Pages โบ Deploy from a branch**, `gh-pages`,
|
|
23
|
+
`/ (root)`.
|
|
24
|
+
|
|
25
|
+
## โ๏ธ Configure
|
|
26
|
+
|
|
27
|
+
Give the adapter to `webApp`. From [`examples/shiplane.config.ts`](./examples/shiplane.config.ts):
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import { changesetsVersioning } from "@shiplane/changesets";
|
|
31
|
+
import { gitSourceControl } from "@shiplane/git";
|
|
32
|
+
import { gitHubActionsCiPipeline, gitHubCodeHost } from "@shiplane/github";
|
|
33
|
+
import { githubPagesStaticHosting } from "@shiplane/github-pages";
|
|
34
|
+
import { defineRelease, releaseFlow, webApp } from "shiplane";
|
|
35
|
+
|
|
36
|
+
export default defineRelease({
|
|
37
|
+
flow: releaseFlow({
|
|
38
|
+
sourceControl: gitSourceControl(),
|
|
39
|
+
codeHost: gitHubCodeHost(),
|
|
40
|
+
ciPipeline: gitHubActionsCiPipeline(),
|
|
41
|
+
versioning: changesetsVersioning(),
|
|
42
|
+
}),
|
|
43
|
+
modules: [webApp({ staticHosting: githubPagesStaticHosting() })],
|
|
44
|
+
});
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Or in a `shiplane.yml`:
|
|
48
|
+
|
|
49
|
+
```yaml
|
|
50
|
+
modules:
|
|
51
|
+
- use: web-app
|
|
52
|
+
with:
|
|
53
|
+
staticHosting: github-pages
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## ๐ Unit file keys
|
|
57
|
+
|
|
58
|
+
In the site's `shiplane.unit.yml`, next to `module: web-app`. The same file in both modes.
|
|
59
|
+
|
|
60
|
+
| Key | Default | Means |
|
|
61
|
+
| ----------- | ---------- | ------------------------------------------------------------------------ |
|
|
62
|
+
| `url` | required | The site's address; its path is given to the build as `BASE_PATH` |
|
|
63
|
+
| `branch` | `gh-pages` | The branch Pages serves |
|
|
64
|
+
| `dist` | `dist` | What the build writes, relative to the unit's folder |
|
|
65
|
+
| `domain` | | A custom domain, written as `CNAME` |
|
|
66
|
+
| `env` | | Variables the build reads, each per environment |
|
|
67
|
+
| `variables` | `[]` | Names the build reads from your shell or, on CI, from GitHub's variables |
|
|
68
|
+
|
|
69
|
+
Source: `GithubPagesOptions` in `src/github-pages-static-hosting.adapter.ts`.
|
|
70
|
+
|
|
71
|
+
## ๐งช Example
|
|
72
|
+
|
|
73
|
+
From [`examples/apps/site/shiplane.unit.yml`](./examples/apps/site/shiplane.unit.yml):
|
|
74
|
+
|
|
75
|
+
```yaml
|
|
76
|
+
module: web-app
|
|
77
|
+
url: https://acme.github.io/acme/
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
`pnpm shiplane ship --dry-run` in that repository prints what a ship to preview would run:
|
|
81
|
+
|
|
82
|
+
```text
|
|
83
|
+
Plan ยท preview ยท nothing runs
|
|
84
|
+
Order 1 site ยท Latest
|
|
85
|
+
|
|
86
|
+
site@1.0.0 โ https://acme.github.io/acme/preview/ (GitHub Pages) (not tagged yet: release first)
|
|
87
|
+
this machine
|
|
88
|
+
BASE_PATH=/acme/preview/ pnpm --filter=@acme/site run build
|
|
89
|
+
sh -c [ -z "$GITHUB_ACTIONS" ] || { git config --global user.name "github-actions[bot]" && git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" && git config --global credential.https://github.com.helper "!gh auth git-credential"; } && { git ls-remote --exit-code --heads origin "$1" >/dev/null || git push origin "$(git commit-tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904 -m "start $1")":"refs/heads/$1"; } sh gh-pages
|
|
90
|
+
npx --yes gh-pages@6.3.0 --dist=apps/site/dist --branch=gh-pages --message=site@1.0.0 --dotfiles --nojekyll --dest=preview
|
|
91
|
+
sh -c [ -z "$GITHUB_ACTIONS" ] || gh api -X POST "repos/$GITHUB_REPOSITORY/pages/builds" --silent || echo "Pages was not asked to build: ship again, or build it from Settings > Pages"
|
|
92
|
+
then record site@1.0.0 on preview in GitHub Deployments
|
|
93
|
+
GitHub Actions
|
|
94
|
+
gh workflow run ship.yml --ref site@1.0.0 -f units=site -f environment=preview
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## ๐ Rules
|
|
98
|
+
|
|
99
|
+
| Case | What happens |
|
|
100
|
+
| ------------------------------- | ---------------------------------------------------------------------- |
|
|
101
|
+
| Base path | Read `BASE_PATH` in the build, such as Astro's `base` or Vite's `base` |
|
|
102
|
+
| `.nojekyll` | Always written: a built site needs no Jekyll |
|
|
103
|
+
| `CNAME` | Kept when no `domain` is named |
|
|
104
|
+
| The branch does not exist | Created empty, so the source is never published |
|
|
105
|
+
| The branch holds the source | Refused |
|
|
106
|
+
| Someone pushed at the same time | The push is refused, never forced: ship again |
|
|
107
|
+
| CI | Ships through shiplane's workflow, which then asks Pages to build |
|
|
108
|
+
|
|
109
|
+
Preview is public, and shares production's origin.
|
|
110
|
+
|
|
111
|
+
## ๐ Tools and sign-ins
|
|
112
|
+
|
|
113
|
+
On your machine, whatever lets `git push` reach the repository. On CI, the workflow's own token,
|
|
114
|
+
with `contents: write` and `pages: write`, which setup writes in `ship.yml`. `npx` fetches
|
|
115
|
+
[gh-pages](https://github.com/tschaub/gh-pages), pinned.
|
|
116
|
+
|
|
117
|
+
## ๐ Docs
|
|
118
|
+
|
|
119
|
+
- ๐ **[Plugins](https://github.com/arnaud-zg/packages/blob/main/docs/shiplane/plugins.md)**: how
|
|
120
|
+
shiplane plugins work, and how to write one
|
|
121
|
+
- ๐ข **[shiplane](https://github.com/arnaud-zg/packages/blob/main/packages/shiplane/README.md)**:
|
|
122
|
+
the release tool this plugin fills a port of
|
|
123
|
+
- ๐ ๏ธ **[How-to](https://github.com/arnaud-zg/packages/blob/main/docs/shiplane/how-to.md)**: add an
|
|
124
|
+
app, promote
|
|
125
|
+
- ๐ **[Reference](https://github.com/arnaud-zg/packages/blob/main/docs/shiplane/reference.md)**:
|
|
126
|
+
commands, flags, the config and unit files
|
|
127
|
+
|
|
128
|
+
## ๐ Downloads
|
|
129
|
+
|
|
130
|
+
<a href="https://npm-stat.com/charts.html?package=@shiplane/github-pages">
|
|
131
|
+
<picture>
|
|
132
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://shieldcn.dev/chart/npm/@shiplane/github-pages.svg?days=90&logo=false&mode=dark" />
|
|
133
|
+
<img alt="@shiplane/github-pages npm downloads per week, last 90 days" src="https://shieldcn.dev/chart/npm/@shiplane/github-pages.svg?days=90&logo=false&mode=light" />
|
|
134
|
+
</picture>
|
|
135
|
+
</a>
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CatalogEntry, DeliveryAdapter, StaticHostingPort } from "shiplane/plugin";
|
|
2
|
+
|
|
3
|
+
//#region src/github-pages-static-hosting.adapter.d.ts
|
|
4
|
+
/** A static build on GitHub Pages: preview in its own folder, production in the rest of the branch. */
|
|
5
|
+
type GithubPagesStaticHostingAdapter = DeliveryAdapter<StaticHostingPort>;
|
|
6
|
+
declare const githubPagesStaticHosting: () => GithubPagesStaticHostingAdapter;
|
|
7
|
+
//#endregion
|
|
8
|
+
//#region src/catalog.d.ts
|
|
9
|
+
/** What a shiplane.yml names from this plugin: `staticHosting: github-pages`. */
|
|
10
|
+
declare const catalog: readonly CatalogEntry[];
|
|
11
|
+
//#endregion
|
|
12
|
+
export { type GithubPagesStaticHostingAdapter, catalog, githubPagesStaticHosting };
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import e from"node:path";import{adapterEntry as t,defineStaticHosting as n,perEnv as r,z as i}from"shiplane/plugin";import{z as a}from"shiplane";const o=`preview`,s=`!(CNAME|${o})`,c=/^(vite|astro|next|nuxt|svelte)\.config\.(ts|js|mjs|cjs)$/,l=i.object({url:i.string().regex(/^https?:\/\/[^/]+/,`the site's address, like https://acme.github.io/site/`).describe(`The site's address; its path is given to the build as BASE_PATH`),branch:i.string().default(`gh-pages`).describe(`The branch Pages serves`),dist:i.string().default(`dist`).describe(`What the build writes, relative to the unit's folder`),domain:i.string().optional().describe(`A custom domain, written as CNAME`),env:i.record(i.string(),r(i.string())).optional().describe(`Variables the build reads, per environment`),variables:i.array(i.string().regex(/^[A-Z][A-Z0-9_]*$/,`a variable name is UPPER_SNAKE, like SITE_KEY`)).default([]).describe(`Variables the build reads from this machine or, on CI, from GitHub's variables`)}),addressOf=(e,t)=>{let n=e.endsWith(`/`)?e:`${e}/`;return t===o?`${n}${o}/`:n},siteOf=e=>{let[t=``,n=``]=e.split(`/`);return n.endsWith(`.github.io`)?`https://${n}/`:`https://${t}.github.io/${n}/`},startBranch=e=>({command:`sh`,args:[`-c`,`[ -z "$GITHUB_ACTIONS" ] || { git config --global user.name "github-actions[bot]" && git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" && git config --global credential.https://github.com.helper "!gh auth git-credential"; } && { git ls-remote --exit-code --heads origin "$1" >/dev/null || git push origin "$(git commit-tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904 -m "start $1")":"refs/heads/$1"; }`,`sh`,e]}),githubPagesStaticHosting=()=>n({name:`github-pages`,settings:l,typicalMinutes:2,describe:({options:e,environment:t})=>`${addressOf(e.url,t)} (GitHub Pages)`,detect:e=>{let t=e.files.find(e=>c.test(e));if(!t)return null;let n=!t.startsWith(`vite.`)||e.has(`index.html`);return{certainty:n?`likely`:`possible`,reason:n&&t.startsWith(`vite.`)?`${t}, index.html`:t,options:{}}},questions:(e,t,n,r)=>t.url===void 0?[{key:`url`,message:`Address of the site?`,...r?{initial:siteOf(r)}:{}}]:[],requirements:e=>{let{variables:t}=l.partial({url:!0}).parse(e.options);return[{label:`GitHub Pages`,check:{command:`git`,args:[`ls-remote`,`--quiet`,`origin`,`HEAD`]},secrets:[`GH_TOKEN`],permissions:{contents:`write`,pages:`write`},...t.length>0?{variables:t}:{}}]},jobs:({unit:t,tag:n,environment:r,options:i,defaultBranch:a})=>{let{branch:c,domain:l}=i;if(c===a)throw Error(`${t.name}: branch "${c}" holds the source, and a ship replaces its files. Use another, such as gh-pages.`);let u=addressOf(i.url,r);return[{label:`build ${n} and publish it to ${u}`,local:[{command:`pnpm`,args:[`--filter=${t.packageName}`,`run`,`build`],env:{BASE_PATH:new URL(u).pathname,...i.env}},startBranch(c),{command:`npx`,args:[`--yes`,`gh-pages@6.3.0`,`--dist=${e.posix.join(t.dir,i.dist)}`,`--branch=${c}`,`--message=${n}`,`--dotfiles`,`--nojekyll`,...l?[`--cname=${l}`]:[],r===o?`--dest=${o}`:`--remove={${s},${s}/**}`]},{command:`sh`,args:[`-c`,`[ -z "$GITHUB_ACTIONS" ] || gh api -X POST "repos/$GITHUB_REPOSITORY/pages/builds" --silent || echo "Pages was not asked to build: ship again, or build it from Settings > Pages"`]}],ci:{ref:n},record:!0}]}}),u=[t({name:`github-pages`,port:`staticHosting`,description:`Deploys each site to GitHub Pages, through a branch`,options:a.object({}),make:()=>githubPagesStaticHosting()})];export{u as catalog,githubPagesStaticHosting};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["z"],"sources":["../src/github-pages-static-hosting.adapter.ts","../src/catalog.ts"],"sourcesContent":["import path from \"node:path\";\nimport type { Command, DeliveryAdapter, StaticHostingPort } from \"shiplane/plugin\";\nimport { defineStaticHosting, perEnv, z } from \"shiplane/plugin\";\n\nconst GH_PAGES = \"gh-pages@6.3.0\";\n\n/** Where preview lives on the branch. Production is the rest of it. */\nconst PREVIEW = \"preview\";\n\n/** Everything at the branch root but these, as a glob. It starts with a brace where it is used: a\n * leading `!` would negate the whole pattern. */\nconst KEPT = `!(CNAME|${PREVIEW})`;\n\nconst BUILT = /^(vite|astro|next|nuxt|svelte)\\.config\\.(ts|js|mjs|cjs)$/;\n\nconst GithubPagesOptions = z.object({\n url: z\n .string()\n .regex(/^https?:\\/\\/[^/]+/, \"the site's address, like https://acme.github.io/site/\")\n .describe(\"The site's address; its path is given to the build as BASE_PATH\"),\n branch: z.string().default(\"gh-pages\").describe(\"The branch Pages serves\"),\n dist: z.string().default(\"dist\").describe(\"What the build writes, relative to the unit's folder\"),\n domain: z.string().optional().describe(\"A custom domain, written as CNAME\"),\n env: z\n .record(z.string(), perEnv(z.string()))\n .optional()\n .describe(\"Variables the build reads, per environment\"),\n variables: z\n .array(z.string().regex(/^[A-Z][A-Z0-9_]*$/, \"a variable name is UPPER_SNAKE, like SITE_KEY\"))\n .default([])\n .describe(\"Variables the build reads from this machine or, on CI, from GitHub's variables\"),\n});\n\nconst addressOf = (url: string, environment: string) => {\n const root = url.endsWith(\"/\") ? url : `${url}/`;\n return environment === PREVIEW ? `${root}${PREVIEW}/` : root;\n};\n\n/** Where GitHub serves a repository's site: a user's or organisation's is named by its address. */\nconst siteOf = (remote: string) => {\n const [owner = \"\", name = \"\"] = remote.split(\"/\");\n return name.endsWith(\".github.io\") ? `https://${name}/` : `https://${owner}.github.io/${name}/`;\n};\n\n// On a branch that does not exist, gh-pages starts from the repository's own files and publishes\n// them. So the branch is there first, empty. An existing one refuses this push: it is not forced.\nconst START =\n // A runner has no identity and no sign-in of its own outside its checkout.\n '[ -z \"$GITHUB_ACTIONS\" ] || { git config --global user.name \"github-actions[bot]\" && git config --global user.email \"41898282+github-actions[bot]@users.noreply.github.com\" && git config --global credential.https://github.com.helper \"!gh auth git-credential\"; } && ' +\n '{ git ls-remote --exit-code --heads origin \"$1\" >/dev/null || git push origin \"$(git commit-tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904 -m \"start $1\")\":\"refs/heads/$1\"; }';\n\n// A push made with a workflow's token builds no Pages site: it is asked for. Not asked, or refused,\n// the files are there all the same.\nconst ASK =\n '[ -z \"$GITHUB_ACTIONS\" ] || gh api -X POST \"repos/$GITHUB_REPOSITORY/pages/builds\" --silent || echo \"Pages was not asked to build: ship again, or build it from Settings > Pages\"';\n\nconst startBranch = (branch: string): Command => ({\n command: \"sh\",\n args: [\"-c\", START, \"sh\", branch],\n});\n\n/** A static build on GitHub Pages: preview in its own folder, production in the rest of the branch. */\nexport type GithubPagesStaticHostingAdapter = DeliveryAdapter<StaticHostingPort>;\n\nexport const githubPagesStaticHosting = (): GithubPagesStaticHostingAdapter =>\n defineStaticHosting({\n name: \"github-pages\",\n settings: GithubPagesOptions,\n typicalMinutes: 2,\n describe: ({ options, environment }) => `${addressOf(options.url, environment)} (GitHub Pages)`,\n detect: (folder) => {\n const built = folder.files.find((file) => BUILT.test(file));\n if (!built) return null;\n // A Vite config without an index.html is usually a library, not a site.\n const site = !built.startsWith(\"vite.\") || folder.has(\"index.html\");\n return {\n certainty: site ? \"likely\" : \"possible\",\n reason: site && built.startsWith(\"vite.\") ? `${built}, index.html` : built,\n options: {},\n };\n },\n questions: (_folder, found, _repository, remote) =>\n found.url === undefined\n ? [\n {\n key: \"url\",\n message: \"Address of the site?\",\n ...(remote ? { initial: siteOf(remote) } : {}),\n },\n ]\n : [],\n requirements: (unit) => {\n const { variables } = GithubPagesOptions.partial({ url: true }).parse(unit.options);\n return [\n {\n label: \"GitHub Pages\",\n check: { command: \"git\", args: [\"ls-remote\", \"--quiet\", \"origin\", \"HEAD\"] },\n secrets: [\"GH_TOKEN\"],\n permissions: { contents: \"write\", pages: \"write\" },\n ...(variables.length > 0 ? { variables } : {}),\n },\n ];\n },\n jobs: ({ unit, tag, environment, options, defaultBranch }) => {\n const { branch, domain } = options;\n if (branch === defaultBranch) {\n throw new Error(\n `${unit.name}: branch \"${branch}\" holds the source, and a ship replaces its files. Use another, such as gh-pages.`,\n );\n }\n const address = addressOf(options.url, environment);\n return [\n {\n label: `build ${tag} and publish it to ${address}`,\n local: [\n {\n command: \"pnpm\",\n args: [`--filter=${unit.packageName}`, \"run\", \"build\"],\n env: { BASE_PATH: new URL(address).pathname, ...options.env },\n },\n startBranch(branch),\n {\n command: \"npx\",\n args: [\n \"--yes\",\n GH_PAGES,\n `--dist=${path.posix.join(unit.dir, options.dist)}`,\n `--branch=${branch}`,\n `--message=${tag}`,\n \"--dotfiles\",\n \"--nojekyll\",\n ...(domain ? [`--cname=${domain}`] : []),\n // Each environment replaces its own files only; CNAME outlives both.\n environment === PREVIEW ? `--dest=${PREVIEW}` : `--remove={${KEPT},${KEPT}/**}`,\n ],\n },\n { command: \"sh\", args: [\"-c\", ASK] },\n ],\n ci: { ref: tag },\n record: true,\n },\n ];\n },\n });\n","import type { CatalogEntry } from \"shiplane/plugin\";\nimport { z } from \"shiplane\";\nimport { adapterEntry } from \"shiplane/plugin\";\n\nimport { githubPagesStaticHosting } from \"./github-pages-static-hosting.adapter\";\n\n/** What a shiplane.yml names from this plugin: `staticHosting: github-pages`. */\nexport const catalog: readonly CatalogEntry[] = [\n adapterEntry({\n name: \"github-pages\",\n port: \"staticHosting\",\n description: \"Deploys each site to GitHub Pages, through a branch\",\n options: z.object({}),\n make: () => githubPagesStaticHosting(),\n }),\n];\n"],"mappings":"iJAIA,MAGM,EAAU,UAIV,EAAO,WAAW,EAAQ,GAE1B,EAAQ,2DAER,EAAqB,EAAE,OAAO,CAClC,IAAK,EACF,QAAQ,CACR,MAAM,o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,KAAM,KAAM,CAAC,KAAM,oLAAI,CAAE,CACrC,CACD,GAAI,CAAE,IAAK,EAAK,CAChB,OAAQ,GACT,CACF,EAEJ,CAAC,CCxIS,EAAmC,CAC9C,EAAa,CACX,KAAM,eACN,KAAM,gBACN,YAAa,sDACb,QAASA,EAAE,OAAO,EAAE,CAAC,CACrB,SAAY,0BAA0B,CACvC,CAAC,CACH"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,61 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shiplane/github-pages",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.6.0-nightly.12",
|
|
4
|
+
"description": "GitHub Pages plugin for shiplane: deploy a static site and its preview to one branch.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"shiplane",
|
|
7
|
+
"github-pages",
|
|
8
|
+
"static-site",
|
|
9
|
+
"deploy"
|
|
10
|
+
],
|
|
11
|
+
"homepage": "https://github.com/arnaud-zg/packages/tree/main/packages/shiplane-github-pages#readme",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/arnaud-zg/packages/issues"
|
|
14
|
+
},
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/arnaud-zg/packages.git",
|
|
18
|
+
"directory": "packages/shiplane-github-pages"
|
|
19
|
+
},
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"author": "Arnaud Zheng <arnaud.zg@gmail.com>",
|
|
22
|
+
"sideEffects": false,
|
|
23
|
+
"type": "module",
|
|
24
|
+
"exports": {
|
|
25
|
+
".": "./dist/index.js",
|
|
26
|
+
"./package.json": "./package.json"
|
|
27
|
+
},
|
|
28
|
+
"main": "./dist/index.js",
|
|
29
|
+
"module": "./dist/index.js",
|
|
30
|
+
"types": "./dist/index.d.ts",
|
|
31
|
+
"files": [
|
|
32
|
+
"dist"
|
|
33
|
+
],
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@arnaud-zg/configs": "0.4.0",
|
|
36
|
+
"@types/node": "^22.20.5",
|
|
37
|
+
"eslint": "^9.39.5",
|
|
38
|
+
"gh-pages": "6.3.0",
|
|
39
|
+
"prettier": "^3.10.1",
|
|
40
|
+
"typescript": "6.0.3",
|
|
41
|
+
"vitest": "^5.1.0",
|
|
42
|
+
"shiplane": "0.6.0-nightly.12"
|
|
43
|
+
},
|
|
44
|
+
"peerDependencies": {
|
|
45
|
+
"shiplane": "0.6.0-nightly.12"
|
|
46
|
+
},
|
|
47
|
+
"shiplane": {
|
|
48
|
+
"adapters": [
|
|
49
|
+
"githubPagesStaticHosting"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"scripts": {
|
|
53
|
+
"build": "tsdown",
|
|
54
|
+
"clean": "git clean -xdf .cache .turbo dist node_modules",
|
|
55
|
+
"format": "prettier --write . --cache --cache-location .cache/.prettiercache",
|
|
56
|
+
"lint": "eslint --cache --cache-location .cache/.eslintcache",
|
|
57
|
+
"test": "vitest run",
|
|
58
|
+
"test:mutate": "stryker run ../../stryker.config.mjs",
|
|
59
|
+
"typecheck": "tsc -p tsconfig.typecheck.json"
|
|
60
|
+
}
|
|
6
61
|
}
|