Skip to content
This repository was archived by the owner on Dec 4, 2021. It is now read-only.
Draft
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
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ module.exports = {
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint"],
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
rules: {
"@typescript-eslint/explicit-module-boundary-types": "off",
},
};
3 changes: 2 additions & 1 deletion .github/workflows/lint-diagnostics.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: reviewdog
name: review

on: [pull_request]

Expand All @@ -14,3 +14,4 @@ jobs:
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review
eslint_flags: --ext .ts,.tsx
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
dist/
.next/
node_modules/
out/
*.log/
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# .prettierignore
dist
.next
Empty file added docs/funcs/.gitkeep
Empty file.
2 changes: 2 additions & 0 deletions docs/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/// <reference types="next" />
/// <reference types="next/types/global" />
19 changes: 19 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"private": true,
"name": "lib.verto.exchange",
"author": "John Letey <johnletey@gmail.com>",
"scripts": {
"dev": "next dev",
"export": "next build && next export"
},
"dependencies": {
"gray-matter": "^4.0.2",
"next": "^9.5.3",
"react": "^16.13.1",
"react-dom": "^16.13.1"
},
"devDependencies": {
"@types/react": "^16.9.49",
"typescript": "^4.0.2"
}
}
17 changes: 17 additions & 0 deletions docs/src/lib/get-funcs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import matter from "gray-matter";
import fs from "fs";
import path from "path";

export default () => {
const funcs = fs
.readdirSync("./funcs/")
.filter((file) => path.extname(file) === ".md")
.map((file) => {
const fileContent = fs.readFileSync(`./funcs/${file}`, "utf8");
const { data, content } = matter(fileContent);

return { ...data, slug: file.split(".")[0], body: content };
});

return funcs;
};
6 changes: 6 additions & 0 deletions docs/src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import "../styles.css";
import type { AppProps } from "next/app";

export default function App({ Component, pageProps }: AppProps) {
return <Component {...pageProps} />;
}
24 changes: 24 additions & 0 deletions docs/src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import getFuncs from "../lib/get-funcs";

const Home = ({ funcs }) => {
return (
<div>
<h1>Coming soon ...</h1>
{funcs.map((func) => (
<a href={`/func/${func.slug}`}>{func.title}</a>
))}
</div>
);
};

export const getStaticProps = () => {
const funcs = getFuncs();

return {
props: {
funcs,
},
};
};

export default Home;
44 changes: 44 additions & 0 deletions docs/src/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
@font-face {
font-family: JetBrainsMono;
src: url("https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff2/JetBrainsMono-Regular.woff2")
format("woff2"),
url("https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff/JetBrainsMono-Regular.woff")
format("woff"),
url("https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/ttf/JetBrainsMono-Regular.ttf")
format("truetype");
}

body {
font-family: "JetBrainsMono", monospace;
padding: 1em 15vw 3em;
}

::selection {
background-color: #b075cd;
}
::-moz-selection {
background-color: #b075cd;
}

h1.title {
font-family: "Inter", sans-serif;
font-size: 2.3em;
font-weight: 600;
}
@media screen and (max-width: 720px) {
h1.title {
width: 100%;
font-size: 2.01em;
}
}

a {
color: #b075cd;
text-decoration: underline;
}
a::selection {
color: #000;
}
a::-moz-selection {
color: #000;
}
19 changes: 19 additions & 0 deletions docs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve"
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}
Loading