diff --git a/by-example/hello-world.ts b/by-example/hello-world.ts new file mode 100644 index 00000000..e9795d0f --- /dev/null +++ b/by-example/hello-world.ts @@ -0,0 +1,18 @@ +/** + * @title Hello World + * @difficulty beginner + * @tags cli, deploy, web + * @run + * @resource {https://docs.deno.com/runtime/manual/getting_started/installation} Deno: Installation + * @resource {https://docs.deno.com/runtime/manual/getting_started/setup_your_environment} Manual: Set up your environment + * @group Basics + * @sortOrder 0 + */ + +// The one and only line in this program will print "Hello, World!" to the +// console. +console.log("Hello, World!"); + +// Deno programs can either be written in JavaScript or TypeScript, or a mixture +// of both. All code in these examples is written in TypeScript, but all the +// examples also work in JavaScript. diff --git a/src/components/DenoByExample/ByExample.tsx b/src/components/DenoByExample/ByExample.tsx index 5791437e..a7995399 100644 --- a/src/components/DenoByExample/ByExample.tsx +++ b/src/components/DenoByExample/ByExample.tsx @@ -1,7 +1,12 @@ import React from "react"; import Layout from "@theme/Layout"; import Footer from "@theme/Footer"; -import { parseExample, DIFFICULTIES, TAGS, ExampleSnippet } from '../../plugins/deno-by-example/example'; +import { + DIFFICULTIES, + ExampleSnippet, + parseExample, + TAGS, +} from "../../plugins/deno-by-example/example"; import CodeBlock from "@theme/CodeBlock"; export default function ByExample({ example, examplesList }) { @@ -28,9 +33,9 @@ export default function ByExample({ example, examplesList }) { }, data: [ parsed, - content - ] - } + content, + ], + }; return ( By Example