create remix project

This commit is contained in:
MapleLeaf
2021-12-29 11:41:24 -06:00
parent f3aab8f425
commit ec8dde942b
35 changed files with 5535 additions and 3001 deletions

1
.npmrc Normal file
View File

@@ -0,0 +1 @@
shamefully-hoist = true

10
docs/.gitignore vendored Normal file
View File

@@ -0,0 +1,10 @@
node_modules
.cache
.vercel
.output
public/build
api/_build
app/docs.json

View File

@@ -1 +0,0 @@
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.

34
docs/README.md Normal file
View File

@@ -0,0 +1,34 @@
# Welcome to Remix!
- [Remix Docs](https://remix.run/docs)
## Deployment
After having run the `create-remix` command and selected "Vercel" as a deployment target, you only need to [import your Git repository](https://vercel.com/new) into Vercel, and it will be deployed.
If you'd like to avoid using a Git repository, you can also deploy the directory by running [Vercel CLI](https://vercel.com/cli):
```sh
npm i -g vercel
vercel
```
It is generally recommended to use a Git repository, because future commits will then automatically be deployed by Vercel, through its [Git Integration](https://vercel.com/docs/concepts/git).
## Development
To run your Remix app locally, make sure your project's local dependencies are installed:
```sh
npm install
```
Afterwards, start the Remix development server like so:
```sh
npm run dev
```
Open up [http://localhost:3000](http://localhost:3000) and you should be ready to go!
If you're used to using the `vercel dev` command provided by [Vercel CLI](https://vercel.com/cli) instead, you can also use that, but it's not needed.

5
docs/api/index.js Normal file
View File

@@ -0,0 +1,5 @@
const { createRequestHandler } = require("@remix-run/vercel");
module.exports = createRequestHandler({
build: require("./_build")
});

View File

@@ -0,0 +1,4 @@
import { hydrate } from "react-dom";
import { RemixBrowser } from "remix";
hydrate(<RemixBrowser />, document);

21
docs/app/entry.server.tsx Normal file
View File

@@ -0,0 +1,21 @@
import { renderToString } from "react-dom/server";
import { RemixServer } from "remix";
import type { EntryContext } from "remix";
export default function handleRequest(
request: Request,
responseStatusCode: number,
responseHeaders: Headers,
remixContext: EntryContext
) {
const markup = renderToString(
<RemixServer context={remixContext} url={request.url} />
);
responseHeaders.set("Content-Type", "text/html");
return new Response("<!DOCTYPE html>" + markup, {
status: responseStatusCode,
headers: responseHeaders
});
}

32
docs/app/root.tsx Normal file
View File

@@ -0,0 +1,32 @@
import {
Links,
LiveReload,
Meta,
Outlet,
Scripts,
ScrollRestoration
} from "remix";
import type { MetaFunction } from "remix";
export const meta: MetaFunction = () => {
return { title: "New Remix App" };
};
export default function App() {
return (
<html lang="en">
<head>
<meta charSet="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<Meta />
<Links />
</head>
<body>
<Outlet />
<ScrollRestoration />
<Scripts />
{process.env.NODE_ENV === "development" && <LiveReload />}
</body>
</html>
);
}

16
docs/app/routes/index.tsx Normal file
View File

@@ -0,0 +1,16 @@
import { readFile } from "fs/promises"
import { json, LoaderFunction, useLoaderData } from "remix"
export const loader: LoaderFunction = async () => {
const docs = await readFile("app/docs.json", "utf8")
return json(JSON.parse(docs))
}
export default function Index() {
const data = useLoaderData()
return (
<main>
<pre>{JSON.stringify(data, undefined, 2)}</pre>
</main>
)
}

View File

@@ -1,22 +0,0 @@
:root {
--light-code-background: #FFFFFF;
--dark-code-background: #1E1E1E;
}
@media (prefers-color-scheme: light) { :root {
--code-background: var(--light-code-background);
} }
@media (prefers-color-scheme: dark) { :root {
--code-background: var(--dark-code-background);
} }
body.light {
--code-background: var(--light-code-background);
}
body.dark {
--code-background: var(--dark-code-background);
}
pre, code { background: var(--code-background); }

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 480 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 855 B

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +0,0 @@
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>reacord</title><meta name="description" content="Documentation for reacord"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script async src="assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base="."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="index.html" class="title">reacord</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><h1>reacord</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><div class="tsd-panel tsd-typography">
<a href="#reacord" id="reacord" style="color: inherit; text-decoration: none;">
<h1>reacord</h1>
</a>
<p>coming soon™</p>
</div></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class="current"><a href="modules.html">Exports</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="tsd-kind-class"><a href="classes/Reacord.html" class="tsd-kind-icon">Reacord</a></li><li class="tsd-kind-class"><a href="classes/ReacordDiscordJs.html" class="tsd-kind-icon">Reacord<wbr/>Discord<wbr/>Js</a></li><li class="tsd-kind-class"><a href="classes/ReacordTester.html" class="tsd-kind-icon">Reacord<wbr/>Tester</a></li><li class="tsd-kind-type-alias"><a href="modules.html#ActionRowProps" class="tsd-kind-icon">Action<wbr/>Row<wbr/>Props</a></li><li class="tsd-kind-type-alias"><a href="modules.html#ButtonClickEvent" class="tsd-kind-icon">Button<wbr/>Click<wbr/>Event</a></li><li class="tsd-kind-type-alias"><a href="modules.html#ButtonProps" class="tsd-kind-icon">Button<wbr/>Props</a></li><li class="tsd-kind-type-alias"><a href="modules.html#ComponentInteractionListener" class="tsd-kind-icon">Component<wbr/>Interaction<wbr/>Listener</a></li><li class="tsd-kind-type-alias"><a href="modules.html#EmbedAuthorProps" class="tsd-kind-icon">Embed<wbr/>Author<wbr/>Props</a></li><li class="tsd-kind-type-alias"><a href="modules.html#EmbedFieldProps" class="tsd-kind-icon">Embed<wbr/>Field<wbr/>Props</a></li><li class="tsd-kind-type-alias"><a href="modules.html#EmbedFooterProps" class="tsd-kind-icon">Embed<wbr/>Footer<wbr/>Props</a></li><li class="tsd-kind-type-alias"><a href="modules.html#EmbedImageProps" class="tsd-kind-icon">Embed<wbr/>Image<wbr/>Props</a></li><li class="tsd-kind-type-alias"><a href="modules.html#EmbedProps" class="tsd-kind-icon">Embed<wbr/>Props</a></li><li class="tsd-kind-type-alias"><a href="modules.html#EmbedThumbnailProps" class="tsd-kind-icon">Embed<wbr/>Thumbnail<wbr/>Props</a></li><li class="tsd-kind-type-alias"><a href="modules.html#EmbedTitleProps" class="tsd-kind-icon">Embed<wbr/>Title<wbr/>Props</a></li><li class="tsd-kind-type-alias"><a href="modules.html#LinkProps" class="tsd-kind-icon">Link<wbr/>Props</a></li><li class="tsd-kind-type-alias"><a href="modules.html#OptionProps" class="tsd-kind-icon">Option<wbr/>Props</a></li><li class="tsd-kind-type-alias"><a href="modules.html#ReacordConfig" class="tsd-kind-icon">Reacord<wbr/>Config</a></li><li class="tsd-kind-type-alias"><a href="modules.html#ReacordInstance" class="tsd-kind-icon">Reacord<wbr/>Instance</a></li><li class="tsd-kind-type-alias"><a href="modules.html#SelectEvent" class="tsd-kind-icon">Select<wbr/>Event</a></li><li class="tsd-kind-type-alias"><a href="modules.html#SelectProps" class="tsd-kind-icon">Select<wbr/>Props</a></li><li class="tsd-kind-function"><a href="modules.html#ActionRow" class="tsd-kind-icon">Action<wbr/>Row</a></li><li class="tsd-kind-function"><a href="modules.html#Button" class="tsd-kind-icon">Button</a></li><li class="tsd-kind-function"><a href="modules.html#Embed" class="tsd-kind-icon">Embed</a></li><li class="tsd-kind-function"><a href="modules.html#EmbedAuthor" class="tsd-kind-icon">Embed<wbr/>Author</a></li><li class="tsd-kind-function"><a href="modules.html#EmbedField" class="tsd-kind-icon">Embed<wbr/>Field</a></li><li class="tsd-kind-function"><a href="modules.html#EmbedFooter" class="tsd-kind-icon">Embed<wbr/>Footer</a></li><li class="tsd-kind-function"><a href="modules.html#EmbedImage" class="tsd-kind-icon">Embed<wbr/>Image</a></li><li class="tsd-kind-function"><a href="modules.html#EmbedThumbnail" class="tsd-kind-icon">Embed<wbr/>Thumbnail</a></li><li class="tsd-kind-function"><a href="modules.html#EmbedTitle" class="tsd-kind-icon">Embed<wbr/>Title</a></li><li class="tsd-kind-function"><a href="modules.html#Link" class="tsd-kind-icon">Link</a></li><li class="tsd-kind-function"><a href="modules.html#Option" class="tsd-kind-icon">Option</a></li><li class="tsd-kind-function"><a href="modules.html#Select" class="tsd-kind-icon">Select</a></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="assets/main.js"></script></body></html>

File diff suppressed because one or more lines are too long

32
docs/package.json Normal file
View File

@@ -0,0 +1,32 @@
{
"private": true,
"name": "reacord-docs",
"description": "",
"license": "",
"scripts": {
"prepare": "typedoc && remix setup node",
"dev": "concurrently 'remix dev' 'typedoc --watch'",
"build": "typedoc && remix build"
},
"dependencies": {
"@remix-run/react": "^1.1.1",
"@remix-run/serve": "^1.1.1",
"@remix-run/vercel": "^1.1.1",
"@vercel/node": "^1.12.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"remix": "^1.1.1",
"typedoc": "^0.22.10"
},
"devDependencies": {
"@remix-run/dev": "^1.1.1",
"@types/react": "^17.0.24",
"@types/react-dom": "^17.0.9",
"concurrently": "^6.5.1",
"typescript": "^4.1.2"
},
"engines": {
"node": ">=14"
},
"sideEffects": false
}

3182
docs/pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

BIN
docs/public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

10
docs/remix.config.js Normal file
View File

@@ -0,0 +1,10 @@
/**
* @type {import('@remix-run/dev/config').AppConfig}
*/
module.exports = {
appDirectory: "app",
assetsBuildDirectory: "public/build",
publicPath: "/build/",
serverBuildDirectory: "api/_build",
ignoredRouteFiles: [".*"]
};

2
docs/remix.env.d.ts vendored Normal file
View File

@@ -0,0 +1,2 @@
/// <reference types="@remix-run/dev" />
/// <reference types="@remix-run/node/globals" />

8
docs/tsconfig.json Normal file
View File

@@ -0,0 +1,8 @@
{
"extends": "../tsconfig",
"compilerOptions": {
"jsx": "react-jsx"
},
"include": [".", "../library"],
"exclude": ["node_modules", ".cache", "api", "public"]
}

View File

@@ -1,9 +1,10 @@
{
"entryPoints": ["library/main.ts"],
"out": "docs",
"entryPoints": ["../library/main.ts"],
"json": "./app/docs.json",
"excludeInternal": true,
"excludePrivate": true,
"excludeProtected": true,
"categoryOrder": ["Classes", "Functions", "*"],
"categorizeByGroup": false
"categorizeByGroup": false,
"preserveWatchOutput": true
}

7
docs/vercel.json Normal file
View File

@@ -0,0 +1,7 @@
{
"build": {
"env": {
"ENABLE_FILE_SYSTEM_API": "1"
}
}
}

View File

@@ -21,8 +21,7 @@
"test-watch": "pnpm test -- --watch",
"coverage": "pnpm test -- --coverage",
"typecheck": "tsc --noEmit",
"playground": "nodemon --exec esmo --ext ts,tsx ./playground/main.tsx",
"docs": "typedoc && git add docs && git commit -m 'docs'"
"playground": "nodemon --exec esmo --ext ts,tsx ./playground/main.tsx"
},
"dependencies": {
"@types/node": "*",
@@ -70,7 +69,6 @@
"react": "^17.0.2",
"tsup": "^5.11.9",
"type-fest": "^2.8.0",
"typedoc": "^0.22.10",
"typescript": "^4.5.4"
},
"resolutions": {

2633
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

1
pnpm-workspace.yaml Normal file
View File

@@ -0,0 +1 @@
workspaces: ['.', docs]

View File

@@ -1,12 +1,15 @@
{
"extends": "@itsmapleleaf/configs/tsconfig.base",
"compilerOptions": {
"noImplicitOverride": true
"noImplicitOverride": true,
"jsx": "react-jsx"
},
"exclude": [
"**/node_modules/**",
"**/coverage/**",
"**/dist/**",
"**/docs/**"
"**/.cache/**",
"**/api/_build/**",
"**/public/**"
]
}