@rooted-adapters/git-pages 1.0.0-alpha.0

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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Marvin Brouwer
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.
@@ -0,0 +1,36 @@
1
+ import { AdapterRoutes } from "@rooted/adapter";
2
+ import { Plugin } from "vite";
3
+
4
+ //#region src/index.d.mts
5
+ /**
6
+ * Options for {@link gitPagesAdapter}.
7
+ */
8
+ type GitPagesAdapterOptions = {
9
+ /**
10
+ * Manual route list for projects that don't use `generateRouteManifest`.
11
+ * See {@link AdapterRoutes}.
12
+ */
13
+ routes?: AdapterRoutes;
14
+ };
15
+ /**
16
+ * Base adapter for git-hosted static pages.
17
+ *
18
+ * Writes the standard static HTML files and a `404.html` SPA shell fallback.
19
+ * Suitable for any git-based page host following the [git-pages.org](https://git-pages.org/) standard.
20
+ *
21
+ * Platform-specific adapters (GitHub Pages, GitLab Pages, Codeberg Pages) extend this adapter.
22
+ *
23
+ * @example `vite.config.ts`
24
+ * ```ts
25
+ * import { rootedManifest } from '@rooted/application'
26
+ * import { gitPagesAdapter } from '@rooted-adapters/git-pages'
27
+ *
28
+ * export default rootedManifest({
29
+ * plugins: [gitPagesAdapter()],
30
+ * })
31
+ * ```
32
+ */
33
+ declare function gitPagesAdapter(options?: GitPagesAdapterOptions): Plugin;
34
+ //#endregion
35
+ export { GitPagesAdapterOptions, gitPagesAdapter };
36
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5tdHMiLCJuYW1lcyI6W10sInNvdXJjZXMiOlsiLi4vc3JjL2luZGV4Lm10cyJdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBUUE7S0FBWSxzQkFBQTs7OztBQTBCWjtFQXJCQyxNQUFBLEdBQVMsYUFBQTtBQUFBOzs7Ozs7Ozs7Ozs7Ozs7Ozs7O2lCQXFCTSxlQUFBLENBQWdCLE9BQUEsR0FBVSxzQkFBQSxHQUF5QixNQUFBIn0=
package/dist/index.mjs ADDED
@@ -0,0 +1,30 @@
1
+ import { staticAdapter } from "@rooted/adapter";
2
+ //#region src/index.mts
3
+ /**
4
+ * Base adapter for git-hosted static pages.
5
+ *
6
+ * Writes the standard static HTML files and a `404.html` SPA shell fallback.
7
+ * Suitable for any git-based page host following the [git-pages.org](https://git-pages.org/) standard.
8
+ *
9
+ * Platform-specific adapters (GitHub Pages, GitLab Pages, Codeberg Pages) extend this adapter.
10
+ *
11
+ * @example `vite.config.ts`
12
+ * ```ts
13
+ * import { rootedManifest } from '@rooted/application'
14
+ * import { gitPagesAdapter } from '@rooted-adapters/git-pages'
15
+ *
16
+ * export default rootedManifest({
17
+ * plugins: [gitPagesAdapter()],
18
+ * })
19
+ * ```
20
+ */
21
+ function gitPagesAdapter(options) {
22
+ return staticAdapter({
23
+ name: "rooted:git-pages",
24
+ routes: options?.routes
25
+ });
26
+ }
27
+ //#endregion
28
+ export { gitPagesAdapter };
29
+
30
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXgubWpzIiwibmFtZXMiOltdLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5tdHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgc3RhdGljQWRhcHRlciB9IGZyb20gJ0Byb290ZWQvYWRhcHRlcidcblxuaW1wb3J0IHR5cGUgeyBBZGFwdGVyUm91dGVzIH0gZnJvbSAnQHJvb3RlZC9hZGFwdGVyJ1xuaW1wb3J0IHR5cGUgeyBQbHVnaW4gfSBmcm9tICd2aXRlJ1xuXG4vKipcbiAqIE9wdGlvbnMgZm9yIHtAbGluayBnaXRQYWdlc0FkYXB0ZXJ9LlxuICovXG5leHBvcnQgdHlwZSBHaXRQYWdlc0FkYXB0ZXJPcHRpb25zID0ge1xuXHQvKipcblx0ICogTWFudWFsIHJvdXRlIGxpc3QgZm9yIHByb2plY3RzIHRoYXQgZG9uJ3QgdXNlIGBnZW5lcmF0ZVJvdXRlTWFuaWZlc3RgLlxuXHQgKiBTZWUge0BsaW5rIEFkYXB0ZXJSb3V0ZXN9LlxuXHQgKi9cblx0cm91dGVzPzogQWRhcHRlclJvdXRlc1xufVxuXG4vKipcbiAqIEJhc2UgYWRhcHRlciBmb3IgZ2l0LWhvc3RlZCBzdGF0aWMgcGFnZXMuXG4gKlxuICogV3JpdGVzIHRoZSBzdGFuZGFyZCBzdGF0aWMgSFRNTCBmaWxlcyBhbmQgYSBgNDA0Lmh0bWxgIFNQQSBzaGVsbCBmYWxsYmFjay5cbiAqIFN1aXRhYmxlIGZvciBhbnkgZ2l0LWJhc2VkIHBhZ2UgaG9zdCBmb2xsb3dpbmcgdGhlIFtnaXQtcGFnZXMub3JnXShodHRwczovL2dpdC1wYWdlcy5vcmcvKSBzdGFuZGFyZC5cbiAqXG4gKiBQbGF0Zm9ybS1zcGVjaWZpYyBhZGFwdGVycyAoR2l0SHViIFBhZ2VzLCBHaXRMYWIgUGFnZXMsIENvZGViZXJnIFBhZ2VzKSBleHRlbmQgdGhpcyBhZGFwdGVyLlxuICpcbiAqIEBleGFtcGxlIGB2aXRlLmNvbmZpZy50c2BcbiAqIGBgYHRzXG4gKiBpbXBvcnQgeyByb290ZWRNYW5pZmVzdCB9IGZyb20gJ0Byb290ZWQvYXBwbGljYXRpb24nXG4gKiBpbXBvcnQgeyBnaXRQYWdlc0FkYXB0ZXIgfSBmcm9tICdAcm9vdGVkLWFkYXB0ZXJzL2dpdC1wYWdlcydcbiAqXG4gKiBleHBvcnQgZGVmYXVsdCByb290ZWRNYW5pZmVzdCh7XG4gKiAgIHBsdWdpbnM6IFtnaXRQYWdlc0FkYXB0ZXIoKV0sXG4gKiB9KVxuICogYGBgXG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBnaXRQYWdlc0FkYXB0ZXIob3B0aW9ucz86IEdpdFBhZ2VzQWRhcHRlck9wdGlvbnMpOiBQbHVnaW4ge1xuXHRyZXR1cm4gc3RhdGljQWRhcHRlcih7IG5hbWU6ICdyb290ZWQ6Z2l0LXBhZ2VzJywgcm91dGVzOiBvcHRpb25zPy5yb3V0ZXMgfSlcbn1cbiJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFrQ0EsU0FBZ0IsZ0JBQWdCLFNBQTBDO0NBQ3pFLE9BQU8sY0FBYztFQUFFLE1BQU07RUFBb0IsUUFBUSxTQUFTO0VBQVEsQ0FBQyJ9
package/package.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "@rooted-adapters/git-pages",
3
+ "version": "1.0.0-alpha.0",
4
+ "description": "Base adapter for git-hosted static pages (GitHub Pages, GitLab Pages, Codeberg Pages)",
5
+ "keywords": [
6
+ "web-components",
7
+ "typescript",
8
+ "rooted"
9
+ ],
10
+ "license": "MIT",
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "git+https://github.com/Marvin-Brouwer/rooted.git",
14
+ "directory": "packages/adapters/git-pages"
15
+ },
16
+ "homepage": "https://github.com/Marvin-Brouwer/rooted#readme",
17
+ "bugs": "https://github.com/Marvin-Brouwer/rooted/issues",
18
+ "sideEffects": false,
19
+ "publishConfig": {
20
+ "registry": "https://registry.npmjs.org/",
21
+ "access": "public",
22
+ "provenance": true
23
+ },
24
+ "files": [
25
+ "dist",
26
+ "readme.md"
27
+ ],
28
+ "engines": {
29
+ "node": ">=22.0.0",
30
+ "pnpm": ">=10.0.0"
31
+ },
32
+ "exports": {
33
+ ".": {
34
+ "import": "./dist/index.mjs",
35
+ "types": "./dist/index.d.mts"
36
+ }
37
+ },
38
+ "peerDependencies": {
39
+ "vite": ">= 8.0.1",
40
+ "@rooted/adapter": "^1.0.0-alpha.0"
41
+ },
42
+ "devDependencies": {
43
+ "@types/node": "^25.6.2",
44
+ "tsx": "^4.21.0",
45
+ "typescript": "^6.0.3",
46
+ "vite": "^8.0.12",
47
+ "@rooted/adapter": "^1.0.0-alpha.0",
48
+ "@rooted/development": "0.1.0",
49
+ "@rooted/tsdown": "^0.1.0"
50
+ },
51
+ "scripts": {
52
+ "build": "pnpm build:ci",
53
+ "build:dev": "pnpm build:ci",
54
+ "build:ci": "tsdown",
55
+ "watch": "tsdown --watch --no-clean",
56
+ "clean": "rm -rf dist"
57
+ }
58
+ }
package/readme.md ADDED
@@ -0,0 +1,28 @@
1
+ # [`@rooted-adapters/git-pages`](https://www.npmjs.com/package/@rooted-adapters/git-pages)
2
+
3
+ Base adapter for git-hosted static pages. Part of the [`@rooted/*`](https://github.com/Marvin-Brouwer/rooted#rooted) framework.
4
+
5
+ Works for any git page host following the [git-pages.org](https://git-pages.org/) standard. Platform-specific adapters (GitHub Pages, GitLab Pages, Codeberg Pages) extend this one.
6
+
7
+ > [!IMPORTANT]
8
+ > This package is still in alpha.
9
+
10
+ ```sh
11
+ pnpm add -D @rooted-adapters/git-pages
12
+ ```
13
+
14
+ ```ts
15
+ // vite.config.mts
16
+ import { rootedManifest } from '@rooted/application'
17
+ import { generateRouteManifest } from '@rooted/router/manifest'
18
+ import { gitPagesAdapter } from '@rooted-adapters/git-pages'
19
+
20
+ export default rootedManifest({
21
+ plugins: [
22
+ generateRouteManifest({ glob: './src/**/_routes.mts', routeManifestPath: './src/_routes.g.mts' }),
23
+ gitPagesAdapter(),
24
+ ],
25
+ })
26
+ ```
27
+
28
+ More in the [adapters guide](https://github.com/Marvin-Brouwer/rooted/blob/main/docs/guide/adapters.md).