Skip to content
This repository has been archived by the owner on Dec 21, 2024. It is now read-only.

refactor: remove dependency on FONTAWESOME_PACKAGE_TOKEN #447

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"scheme": "file"
}
],
"deno.disablePaths": ["packages/editor"],
"cSpell.enableFiletypes": [
"mdx"
],
Expand Down
5 changes: 0 additions & 5 deletions packages/backend-embed/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ async fn main() -> Result<()> {
.arg("run")
.arg("-A")
.arg(&script_path)
// shhh font awesome can suck it, we'll fix this soon (tm)
.env(
"FONTAWESOME_PACKAGE_TOKEN",
"E7A94808-3467-4150-B90D-EABDAEB9E0B4",
)
.status()?;
if !status.success() {
panic!("build artifacts failed");
Expand Down
1 change: 0 additions & 1 deletion packages/editor/.env.example

This file was deleted.

8 changes: 1 addition & 7 deletions packages/editor/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
nodeLinker: node-modules

npmScopes:
fortawesome:
npmAlwaysAuth: true
npmRegistryServer: 'https://npm.fontawesome.com/'
npmAuthToken: ${FONTAWESOME_PACKAGE_TOKEN}
nodeLinker: node-modules
9 changes: 7 additions & 2 deletions packages/editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^6.6.0",
"@fortawesome/pro-solid-svg-icons": "^6.6.0",
"@fortawesome/free-brands-svg-icons": "^6.6.0",
"@fortawesome/free-solid-svg-icons": "^6.6.0",
"@fortawesome/react-fontawesome": "^0.2.2",
"@rivet-gg/components": "https://github.com/rivet-gg/hub#workspace=@rivet-gg/components&head=07-14-feat_opengb_web",
"@rivet-gg/components": "https://github.com/rivet-gg/hub#workspace=@rivet-gg/components&head=09-18-icons_pack",
"@rivet-gg/icons": "*",
"@sentry/react": "^8.17.0",
"@tanstack/query-broadcast-client-experimental": "^5.50.1",
"@tanstack/query-sync-storage-persister": "^5.50.1",
Expand Down Expand Up @@ -41,5 +43,8 @@
"typescript": "^5.2.2",
"vite": "^5.2.0",
"vite-plugin-favicons-inject": "^2.2.0"
},
"resolutions": {
"@rivet-gg/icons": "https://github.com/rivet-gg/hub#workspace=@rivet-gg/icons&head=09-18-icons_pack"
}
}
5 changes: 3 additions & 2 deletions packages/editor/src/app.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { library } from "@fortawesome/fontawesome-svg-core";
import { fas } from "@fortawesome/pro-solid-svg-icons";
import { iconPack } from "@rivet-gg/icons";
import {
FullscreenLoading,
Toaster,
Expand All @@ -12,7 +12,8 @@ import { RouterProvider, createRouter } from "@tanstack/react-router";
import { Suspense } from "react";
import { queryClient } from "./queries/global";
import { routeTree } from "./routeTree.gen";
library.add(fas);

library.add(iconPack);

declare module "@tanstack/react-router" {
interface Register {
Expand Down
4 changes: 2 additions & 2 deletions packages/editor/src/components/message-banner.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { Icon } from "@rivet-gg/icons";
import { Button, Strong, WithTooltip } from "@rivet-gg/components";
import { useQuery } from "@tanstack/react-query";
import { type PropsWithChildren, useContext, useEffect } from "react";
Expand Down Expand Up @@ -66,7 +66,7 @@ function Content() {
size="icon"
variant="outline"
>
<FontAwesomeIcon icon="download" />
<Icon icon="download" />
</Button>
</div>
}
Expand Down
8 changes: 4 additions & 4 deletions packages/editor/src/components/module-card.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { Icon } from "@rivet-gg/icons";
import {
Button,
Card,
Expand Down Expand Up @@ -78,7 +78,7 @@ function DeleteModuleButton({
setValue("modules", otherModules, { shouldDirty: true });
}}
>
<FontAwesomeIcon icon="trash" />
<Icon icon="trash" />
</Button>
</div>
}
Expand Down Expand Up @@ -119,7 +119,7 @@ export function ModuleCard({
justify="between"
>
<h4 className="font-bold bg-background-main px-1 -ml-1">
{module.config.icon ? <FontAwesomeIcon icon={module.config.icon} className="mr-2" /> : null}
{module.config.icon ? <Icon icon={module.config.icon} className="mr-2" /> : null}
{module.config.name}
</h4>
<Flex gap="2" className="bg-background-main px-1 -ml-1">
Expand All @@ -139,7 +139,7 @@ export function ModuleCard({
target="_blank"
rel="noreferrer"
>
<FontAwesomeIcon icon="book" />
<Icon icon="book" />
</a>
</Button>
}
Expand Down
4 changes: 2 additions & 2 deletions packages/editor/src/components/modules-select.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { Icon } from "@rivet-gg/icons";
import { Badge, Combobox, type ComboboxProps, Flex } from "@rivet-gg/components";
import { useSuspenseQuery } from "@tanstack/react-query";
import { forwardRef } from "react";
Expand Down Expand Up @@ -79,7 +79,7 @@ function ModulesSelectOption({
<Flex gap="2" direction="col" asChild>
<span>
<span className="flex items-center gap-1">
{module.icon ? <FontAwesomeIcon icon={module.icon} className="w-4" /> : null}
{module.icon ? <Icon icon={module.icon} className="w-4" /> : null}
<span className="text-left">
{module.name
? (
Expand Down
7 changes: 3 additions & 4 deletions packages/editor/src/routes/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { faPlus } from "@fortawesome/pro-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { Icon,faPlus } from "@rivet-gg/icons";
import {
Button,
Card,
Expand Down Expand Up @@ -31,7 +30,7 @@ function NewModuleButton() {
<Button
size="sm"
className="text-foreground"
startIcon={<FontAwesomeIcon icon={faPlus} />}
startIcon={<Icon icon={faPlus} />}
variant="outline"
onClick={() => ref?.current?.click()}
>
Expand All @@ -52,7 +51,7 @@ function IndexRoute() {
{Object.entries(data?.modules).map(([name, module]) => {
return (
<Link to="/" hash={name} key={name}>
{module.config.icon ? <FontAwesomeIcon icon={module.config.icon} className="mr-1" /> : null}
{module.config.icon ? <Icon icon={module.config.icon} className="mr-1" /> : null}
{module.config.name || module.namePascal}
</Link>
);
Expand Down
Loading
Loading