Giter Site home page Giter Site logo

manual's Introduction

(DEPRECATED) Deno Manual

This repository was formerly the home of the Deno manual, running at deno.land/manual. The instructions below describe how to run the doc site and preview changes.

New contributions should be made to docs.deno.com

manual's People

Contributors

ayame113 avatar bartlomieju avatar caspervonb avatar cknight avatar crowlkats avatar dsherret avatar getspooky avatar gjzwiers avatar grian32 avatar iuioiua avatar kidonng avatar kitsonk avatar kt3k avatar littledivy avatar lucacasonato avatar magurotuna avatar mattd3v avatar nayeemrmn avatar poignardazur avatar pvcresin avatar robdwaller avatar roj1512 avatar ry avatar sant123 avatar sigmasd avatar tniessen avatar tokiedokie avatar trivikr avatar ultirequiem avatar vwkd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

manual's Issues

Go through release blog posts from this year and update manual accordingly

Blog posts announcing release have a lot of useful information that somehow creeped into being a "de facto" documentation for different features we've added this year.

We should go posts and convert relevant paragraphs into pages in the manual.

Below is the list of all blog posts from this year with proposed paragraphs that could be turned into manual pages:

  • Deno 1.7 Release Notes
    • Location API
    • Configurable permissions in workers
  • Deno 1.8 Release Notes
    • WebGPU API
  • Deno 1.9 Release Notes
    • Native HTTP server
    • serde_v8 (add to "Architecture" page)
    • Allow lists for --allow-env and --allow-run
    • Using TLS with Deno
  • Deno 1.10 Release Notes
    • Web Storage API
    • Shared memory in WASM
  • Deno 1.11 Release Notes
    • Docker images
    • Web Crypto APIs
    • AbortController
    • BroadcastChannel (this warrants a separate page, because it works slightly different than in web browser)
  • Deno 1.12 Release Notes
    • WS support in native HTTP
    • REPL updates
    • MessageChannel and MessagePort (can be combined with BroadcastChannel)
    • Atomics/SharedArrayBuffer
    • WeakRef/FinalizationRegistry
    • Debugger improvements
    • Programmatic proxy in fetch

Error in fetch_data example

In fetch_data example:

/**
 * Output: HTML Data
 */
const textResponse = fetch("https://deno.land/");
const textData = await textResponse.text();
console.log(textData);

Throws error:

> deno run  --allow-net test.ts

error: TS2339 [ERROR]: Property 'text' does not exist on type 'Promise<Response>'.
const textData = await textResponse.text();
                                    ~~~~

I think the await should be moved? this works:

const textResponse = await fetch("https://deno.land/");
const textData = textResponse.text();
console.log(textData);

New manual website

Now that the manual is moved out of the main repo, it is a great time to improve the manual website. Here are the primary design constraints:

  • Run on Deno for local development, and Deno Deploy for production
  • Server side rendered
  • Support a light and dark theme
  • High quality OpenGraph metadata (for example for Twitter cards)
  • High quality markdown rendering with a good markdown stylesheet
  • Accessible & easy to use on mobile and desktop
  • 100/100/100/100 Lighthouse score
  • Test coverage
  • Integrate Algolia DocSearch like the current site does
  • No, or very very minimal client side JS. None should be required for first render, then <10 KB for progressive enhancement

The manual returns 404 Not Found for v1.13.0

The Deno Manual is not working for v1.13.0, it is returning 404 messages. Found this out after clicking a link to the manual in the 1.13.0 release blog post (The previous version 1.12.2 does still work)

Error in the docs

Fetch API
The docs don't seem to be updated yet.
image
It's missing an await. I've noticed that the main branch is having the fix, but it's not updated on the site.

Documentation: Deno.listen vs. listenAndServe

I've run into numerous articles informing about the new fast and native HTTP server via the runtime Deno.{listen,serveHttp}. However, most examples that are available use the higher-level listenAndServe pulled from std. I would love to know more about differences between these two layers, i.e. what exactly is listenAndServe doing for me (and for what price/overhead) when compared to the pure-runtime approach (which honestly is not that awfully verbose).

more worker example

Deno not only new js/ts runtime, it is good env for learning js/ts, for this raison I hope we have more example in deno manual or link for good example and use case for worker

Style Guide History

Howdy ๐Ÿ‘‹ I was reading up on Deno, as it's something that we're looking to add to our toolchain, and I happened across a few issues talking about naming formats for the registry, and one that referenced the style guide. Given that many (most?) Deno users are Node converts or current users, I found the assertion that snake_cased filenames were considered best practice very curious (https://deno.land/manual/contributing/style_guide#use-underscores-not-dashes-in-filenames). It's something we see in other non-JS language quite often, but it was the first time I'd seen that in something node-adjacent that wasn't authored by python devs.

So I figured there must be a reason, and being open source, some kind of reference, decision making history, or discussion history as to why the decision was made. Being able to tell my team that it's not something that a lone developer decided for arbitrary or personal preferences is pretty important for buy-in. Unfortunately the history for the file in this repo doesn't contain any breadcrumbs that allow for tracing the decision making process for that bit. I thought that was unfortunate.

Can anyone point me in the right direction?

TypeScript: How to setup external module type definition like @types

In the following section in the TypeScript guide explaining how to apply d.ts file that's you have already.

But person who are familiar Node.js's npm package like me, execute command like npm install -D @types/react and then get type definition file from DefinitelyTyped.

As a one of React/Node.js developer, current manual seems like unclear to get type definition file of external modules.

I think it's better if the manual is covering that concern clearly.

Thank you. ๐Ÿค—

[email protected] mailto link broken in contributing section

The mailto:link is incorrectly converted to a page of the website instead of to an actual mailto link. Not sure if this is the right place to put it, it might be a bug with the SSG, but I'm hoping I'll be directed further from here if it isn't.

image

Errors in WS example docs 1.13.0

Deno Doc 1.13.0 chap 3.5 Websocket example ...

const { webSocket, response } = Deno.upgradeWebSocket(req);

gives error: Property 'webSocket' does not exist on type 'WebSocketUpgrade'.deno-ts(2339)

If I change this to ...

const { socket, response } = Deno.upgradeWebSocket(req);

it works okay.

lib.deno.http_unstable.d.ts shows

declare namespace Deno {
  export interface WebSocketUpgrade {
    response: Response;
    socket: WebSocket;
  }
}

Also, WebSocket.onerror returns (Event | ErrorEvent) so

console.log("socket errored:", e.message); 
// Error: Property 'message' does not exist on type 'Event'.deno-ts(2339)
// Changed to 

console.log("socket errored:", e.type); // clears the error

Typecheck examples in the manual

With denoland/deno#11421 landed, we can now use canary channel to type check examples in the manual.

Since manual uses $STD_VERSION tags, we'll need to add an import map file, that will map to latest version of standard library.

This functionality should be added as part of CI script.

CC @caspervonb

Add FS / HTTP streaming examples

Some questions come up on the community Discord on a regular basis, that we should probably add examples for in the manual:

  • How do I stream a response from fetch to a file on disk?
  • How do I stream a file on disk to a response for Deno.serveHttp?
  • How do I upload stream a file to a web service via fetch?

Add docs for debugging with VSCode

The ## Using the debugger section in /vscode_deno.md is empty right now.

Should demo the same thing as is described in getting_started/debugging_your_code.md, just with VSCode instead of Chrome Dev Tools.

more worker example

Deno not only new js/ts runtime, it is good env for learning js/ts, for this raison I hope we have more example in deno manual or link for good example and use case for worker

Make more examples platform agnostic

The following parts of the manual aren't as good as they could be for users more familiar with Windows:

  1. https://deno.land/[email protected]/getting_started/first_steps#reading-a-file - Uses /etc/passwd
  2. https://deno.land/[email protected]/getting_started/first_steps#tcp-server - Uses netcat. In other parts of the manual it at least mentions this is Linux/MacOS only (ex. https://deno.land/[email protected]/examples/tcp_echo)
  3. https://deno.land/[email protected]/getting_started/command_line_interface#script-source - Uses cat, which is not available on the command line in windows and code does not work in powershell. Maybe this one is not a big deal to change.
  4. https://deno.land/[email protected]/getting_started/permissions#permissions-allow-list - Talks about the /usr and /etc directory. Tries to access /etc/passwd

https://discord.com/channels/684898665143206084/684898665151594506/870313956982554645

Add output behavior of `deno fmt`

Took me a few hours to figure out that the formatter outputs to stderr while I was trying to use command substitution with the output of the formatter, so can a simple sentence be added to the formatter docs for this output behavior?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.