Skip to content

Commit aa0d746

Browse files
committed
chore: Cleanup unnecessary config files
1 parent a249ffb commit aa0d746

File tree

6 files changed

+17
-21
lines changed

6 files changed

+17
-21
lines changed

.npmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

bunfig.toml

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/@types/modules.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ declare module "*.gql" {
33
export default text;
44
}
55

6-
declare module "*.tmpl" {
6+
declare module "*.html" {
77
const text: string;
88
export default text;
99
}
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -47,32 +47,32 @@
4747
</script>
4848
<script type="module">
4949
// Import React and ReactDOM
50-
import React from 'react';
51-
import ReactDOM from 'react-dom/client';
50+
import React from "react";
51+
import ReactDOM from "react-dom/client";
5252
// Import GraphiQL and the Explorer plugin
53-
import { GraphiQL, HISTORY_PLUGIN } from 'graphiql';
54-
import { createGraphiQLFetcher } from '@graphiql/toolkit';
55-
import { explorerPlugin } from '@graphiql/plugin-explorer';
53+
import { GraphiQL, HISTORY_PLUGIN } from "graphiql";
54+
import { createGraphiQLFetcher } from "@graphiql/toolkit";
55+
import { explorerPlugin } from "@graphiql/plugin-explorer";
5656

57-
import createJSONWorker from 'https://esm.sh/monaco-editor/esm/vs/language/json/json.worker.js?worker';
58-
import createGraphQLWorker from 'https://esm.sh/monaco-graphql/esm/graphql.worker.js?worker';
59-
import createEditorWorker from 'https://esm.sh/monaco-editor/esm/vs/editor/editor.worker.js?worker';
57+
import createJSONWorker from "https://esm.sh/monaco-editor/esm/vs/language/json/json.worker.js?worker";
58+
import createGraphQLWorker from "https://esm.sh/monaco-graphql/esm/graphql.worker.js?worker";
59+
import createEditorWorker from "https://esm.sh/monaco-editor/esm/vs/editor/editor.worker.js?worker";
6060

6161
globalThis.MonacoEnvironment = {
6262
getWorker(_workerId, label) {
63-
console.info('MonacoEnvironment.getWorker', { label });
63+
console.info("MonacoEnvironment.getWorker", { label });
6464
switch (label) {
65-
case 'json':
65+
case "json":
6666
return createJSONWorker();
67-
case 'graphql':
67+
case "graphql":
6868
return createGraphQLWorker();
6969
}
7070
return createEditorWorker();
7171
},
7272
};
7373

7474
const fetcher = createGraphiQLFetcher({
75-
url: '/api'
75+
url: "/api",
7676
});
7777
const plugins = [HISTORY_PLUGIN, explorerPlugin()];
7878

@@ -84,7 +84,7 @@
8484
});
8585
}
8686

87-
const container = document.getElementById('graphiql');
87+
const container = document.getElementById("graphiql");
8888
const root = ReactDOM.createRoot(container);
8989
root.render(React.createElement(App));
9090
</script>

src/graphql/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { buildSchema, graphql } from "graphql";
2-
import gqlSchema from "../assets/schema.gql";
2+
import gqlSchema from "../assets/schema.gql" with { type: "text" };
33
import { rootResolver } from "./resolvers";
44
import { consola } from "consola";
55
import pc from "picocolors";

src/routes/grpahql-routes.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { createApp } from "@aklinker1/zeta";
2-
import PLAYGROUND_HTML_TEMPLATE from "../assets/playground.html.tmpl" with { type: "text" };
2+
import PLAYGROUND_HTML_TEMPLATE from "../assets/playground.html" with { type: "text" };
33
import { version } from "../../package.json";
44
import { createGraphql } from "../graphql";
55
import { z } from "zod";
66
import dedent from "dedent";
77

8-
const PLAYGROUND_HTML = PLAYGROUND_HTML_TEMPLATE.replace(
8+
const PLAYGROUND_HTML = (PLAYGROUND_HTML_TEMPLATE as any as string).replace(
99
"{{VERSION}}",
1010
version,
1111
);

0 commit comments

Comments
 (0)