polen 0.0.3 → 0.0.5

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 CHANGED
@@ -5,5 +5,51 @@ A framework for delightful GraphQL developer portals ✨.
5
5
  ## Installation
6
6
 
7
7
  ```
8
- npm add polen
8
+ npm add polen vite
9
9
  ```
10
+
11
+ Vite is a peer dependency of Polen.
12
+
13
+ ## Usage
14
+
15
+ The following shows minimal default usage.
16
+
17
+ 1. Have a GraphQL schema file in the same directory that you run `vite`.
18
+
19
+ ```graphql
20
+ type Query {
21
+ hello: String
22
+ }
23
+ ```
24
+
25
+ 2. Use Polen in your Vite config.
26
+
27
+ ```ts
28
+ import { defineConfig } from 'vite'
29
+ import { Polen } from 'polen'
30
+
31
+ export default defineConfig({
32
+ plugins: [
33
+ Polen.VitePlugin({
34
+ // options here...
35
+ }),
36
+ ],
37
+ })
38
+ ```
39
+
40
+ 3. Build your developer portal.
41
+
42
+ ```sh
43
+ npx vite build --app
44
+ ```
45
+
46
+ 4. You now have a deployable developer portal. Try it locally
47
+ (http://localhost:5174):
48
+
49
+ ```sh
50
+ node dist/entry.js
51
+ ```
52
+
53
+ ## Examples
54
+
55
+ You can find working examples in the [examples](./examples) directory.
@@ -31,7 +31,7 @@ export const TypeAnnotation = ({ type }) => {
31
31
  }
32
32
  // If it's an expandable type (object or interface), make it a link
33
33
  // if (Grafaid.isExpandableType(namedType)) {
34
- return (<Link to="/reference/${namedType.name}">
34
+ return (<Link to={`/reference/${namedType.name}`}>
35
35
  <Text color={isScalarType(namedType) ? `purple` : `blue`}>{namedType.name}</Text>
36
36
  </Link>);
37
37
  // For scalar and other non-expandable types, just render the name
@@ -8,7 +8,6 @@ import { createRoute } from '../../lib/react-router-helpers.js';
8
8
  import { reference$type } from './reference.$type.jsx';
9
9
  const loader = () => {
10
10
  const documentNode = parse(schemaFileContent);
11
- // console.log(`running loader`, documentNode)
12
11
  return {
13
12
  documentNode,
14
13
  };
package/package.json CHANGED
@@ -1,7 +1,11 @@
1
1
  {
2
2
  "name": "polen",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "type": "module",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/the-guild-org/polen.git"
8
+ },
5
9
  "exports": {
6
10
  ".": "./build/_namespace.js",
7
11
  "./exports": "./build/_exports.js"
@@ -12,25 +16,18 @@
12
16
  ],
13
17
  "dependencies": {
14
18
  "@hono/node-server": "^1.14.0",
15
- "@hono/vite-build": "^1.5.0",
16
19
  "@hono/vite-dev-server": "^0.19.0",
17
20
  "@radix-ui/themes": "^3.2.1",
18
21
  "consola": "^3.4.2",
19
22
  "defu": "^6.1.4",
20
23
  "es-toolkit": "^1.34.1",
21
24
  "fuse.js": "^7.1.0",
22
- "get-port-please": "^3.1.2",
23
25
  "graphql": "^16.10.0",
24
26
  "hono": "^4.7.5",
25
27
  "marked": "^15.0.7",
26
28
  "react": "^19.1.0",
27
29
  "react-dom": "^19.1.0",
28
- "react-helmet-async": "^2.0.5",
29
- "react-markdown": "^10.1.0",
30
- "react-router": "^7.5.0",
31
- "rollup": "^4.39.0",
32
- "tsx": "^4.19.3",
33
- "zod": "^3.24.2"
30
+ "react-router": "^7.5.0"
34
31
  },
35
32
  "devDependencies": {
36
33
  "@changesets/cli": "^2.28.1",
@@ -43,6 +40,7 @@
43
40
  "@typescript-eslint/eslint-plugin": "^8.29.0",
44
41
  "@typescript-eslint/parser": "^8.29.0",
45
42
  "@vitejs/plugin-react": "^4.3.4",
43
+ "dripip": "^0.10.0",
46
44
  "eslint": "^9.24.0",
47
45
  "eslint-plugin-deprecation": "^3.0.0",
48
46
  "eslint-plugin-only-warn": "^1.1.0",
@@ -52,6 +50,7 @@
52
50
  "eslint-plugin-unused-imports": "^4.1.4",
53
51
  "globals": "^16.0.0",
54
52
  "publint": "^0.3.10",
53
+ "tsx": "^4.19.3",
55
54
  "typescript": "^5.8.3",
56
55
  "typescript-eslint": "^8.29.0",
57
56
  "vite": "^6.2.5",
@@ -73,6 +72,7 @@
73
72
  "check:format": "dprint check",
74
73
  "check:lint": "eslint . --max-warnings 0",
75
74
  "check:types": "tsc --noEmit",
76
- "check:publint": "publint run --strict"
75
+ "check:publint": "publint run --strict",
76
+ "release:version": "changeset version && git commit -am \"chore: release\" && git push"
77
77
  }
78
78
  }