Skip to content
This repository has been archived by the owner on Jun 29, 2023. It is now read-only.

refactor: switch to fresh #2016

Merged
merged 47 commits into from
Feb 24, 2022
Merged

refactor: switch to fresh #2016

merged 47 commits into from
Feb 24, 2022

Conversation

crowlKats
Copy link
Member

@crowlKats crowlKats commented Feb 22, 2022

Left to do:

@vercel
Copy link

vercel bot commented Feb 22, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/denoland/deno-website2/GfRQszxL521hTBgpcS621z8vLfjk
✅ Preview: https://deno-website2-git-fresh-denoland.vercel.app

Comment on lines +8 to +25
import "https://esm.sh/prismjs@1.25.0/components/prism-bash?no-check";
//import "https://esm.sh/prismjs@1.25.0/components/prism-batch?no-check";
import "https://esm.sh/prismjs@1.25.0/components/prism-css?no-check";
//import "https://esm.sh/prismjs@1.25.0/components/prism-css-extras?no-check";
//import "https://esm.sh/prismjs@1.25.0/components/prism-editorconfig?no-check";
import "https://esm.sh/prismjs@1.25.0/components/prism-diff?no-check";
//import "https://esm.sh/prismjs@1.25.0/components/prism-docker?no-check";
//import "https://esm.sh/prismjs@1.25.0/components/prism-git?no-check";
//import "https://esm.sh/prismjs@1.25.0/components/prism-ignore?no-check";
import "https://esm.sh/prismjs@1.25.0/components/prism-javascript?no-check";
//import "https://esm.sh/prismjs@1.25.0/components/prism-js-extras?no-check";
//import "https://esm.sh/prismjs@1.25.0/components/prism-js-templates?no-check";
//import "https://esm.sh/prismjs@1.25.0/components/prism-jsdoc?no-check";
import "https://esm.sh/prismjs@1.25.0/components/prism-json?no-check";
import "https://esm.sh/prismjs@1.25.0/components/prism-jsx?no-check";
//import "https://esm.sh/prismjs@1.25.0/components/prism-markdown?no-check";
import "https://esm.sh/prismjs@1.25.0/components/prism-rust?no-check";
//import "https://esm.sh/prismjs@1.25.0/components/prism-toml?no-check";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are these commented out?

Copy link
Member Author

@crowlKats crowlKats Feb 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of these dont work, so will look into this on a later date

@@ -45,164 +64,94 @@ export interface CodeBlockProps {
export function RawCodeBlock({
code,
language,
className: extraClassName,
class: extraClassName,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be preferable to avoid keywords like class ... is there a reason for this change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we declare classes with class attribute, this is just to keep in line with that

components/CodeBlock.tsx Outdated Show resolved Hide resolved
components/Header.tsx Outdated Show resolved Hide resolved
deps.ts Show resolved Hide resolved
main.ts Show resolved Hide resolved
Comment on lines +25 to +38
<meta name="twitter:card" content="summary_large_image" />
<meta property="og:locale" content="en_US" />
<meta property="og:site_name" content="DenoLand" />
<meta
property="og:title"
content="Deno - A modern runtime for JavaScript and TypeScript"
/>
<meta
property="og:description"
content="Deno is a simple, modern runtime for JavaScript and
TypeScript that uses V8 and is built in Rust."
/>
<meta property="og:image" content="/images/icons/icon-512x512.png" />
<meta property="og:type" content="website" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not for now but I'd really like to have custom og:description for each page in the future. Current og behavior is pretty obnoxious and not very useful.

Comment on lines +19 to +40
async function getVersionList(module) {
const url = \`${CDN_ENDPOINT}\${module}/meta/versions.json\`;
const res = await fetch(url, {
headers: {
accept: 'application/json',
},
});
if (res.status === 403 || res.status === 404) return null;
if (res.status !== 200) {
throw Error(
\`Got an error (\${res.status}) while getting the version list:\\n\${await res
.text()}\`,
);
}

return await res.json();
}

function updateWebhookUrl() {
const name = document.getElementById('modulename').value;
const subdir = document.getElementById('subdirectory').value;
document.getElementById('webhookURL').innerText = \`https://api.deno.land/webhook/gh/\${name}\${subdir ? ('?subdir=' + encodeURIComponent(subdir)) : ''}\`;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not for now, but string literals is not the ideal place to be programming... Why isn't fresh's esbuild capabilities not sufficient ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

util/registry_utils.ts Show resolved Hide resolved
util/registry_utils.test.ts Show resolved Hide resolved
util/prism_utils.ts Outdated Show resolved Hide resolved
util/benchmark_utils.ts Show resolved Hide resolved
Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - massive rewrite @crowlKats - nice work!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants