Coder Social home page Coder Social logo

docland's Introduction


Build Status - Cirrus Twitter handle Discord Chat

A Deno CLI/Deploy server application which generates documentation for arbitrary JavaScript and TypeScript modules.


When a documentation page is requested, the following occurs at a high level:

  • The request URL is processed by the oak router, matching the URL to the route patterns.
  • When it is matched to a documentation page, the middleware checks to see if the documentation JSON structure is in memory.
  • If the module isn't in memory, the middleware will attempt to generate the documentation JSON structure.
  • It calls the doc() function from deno_doc with a custom in memory caching loader function.
  • doc() uses deno_graph and swc to generate the documentation JSON structure.
  • Once the structure is generated, it uses Nano JSX and twind to server side render a JSX/TSX structure which generates itself based off the JSON documentation structure.
  • This is then passed back the the requestor.
  • If the URL matched is a "card" image, this is server side rendered as a JSX/TSX SVG which is then rendered as a PNG using resvg_wasm.


To run the server locally:

> deno task dev

The server will start listening on port 8080, which will be logged to the console when ready to accept requests.

If you are deploying on Deploy, the main.ts should be the module you deploy.


In order to speed up displaying the built-in documentation, there is a build script. This will fetch all the releases from GitHub for the Deno CLI and rebuild the latest release, plus build any missing versions.

To execute the build script:

> deno task build


We appreciate your help!

To contribute, please read our contributing instructions.

This repository includes .devcontainer metadata which will allow a development container to be built which has all the development pre-requisites available to make contribution easier.

Copyright 2021 the Deno Authors. All rights reserved. MIT License.

docland's People


kitsonk avatar bartlomieju avatar dsherret avatar lucacasonato avatar satyarohith avatar kt3k avatar piscisaureus avatar cjihrig avatar littledivy avatar UltiRequiem avatar crowlKats avatar mrkldshv avatar ry avatar ayame113 avatar

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.