All Projects → denoland → deno_doc

denoland / deno_doc

Licence: MIT license
Documentation generator for Deno

Programming Languages

rust
11053 projects
javascript
184084 projects - #8 most used programming language
typescript
32286 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to deno doc

optionals
Rust-like error handling and options for TypeScript and Deno!
Stars: ✭ 97 (-40.12%)
Mutual labels:  deno
lisan
🌈i18n, Reimagined! 🚀A blazing fast and super small i18n library for Javascript
Stars: ✭ 85 (-47.53%)
Mutual labels:  deno
monkey-master
A deno tool for buying hot GPUs in JD, such as RTX3080 rx6800, a thick-skinned orange!
Stars: ✭ 180 (+11.11%)
Mutual labels:  deno
exodus.ts
The first MongoDB compatible data migration tool built on for the Deno runtime environment, allowing users to perform complete schema and database migrations.
Stars: ✭ 42 (-74.07%)
Mutual labels:  deno
publish
Publish your module with one command in Deno.
Stars: ✭ 16 (-90.12%)
Mutual labels:  deno
depsbot
⚙️ GitHub action to check freshness of your deno dependencies
Stars: ✭ 28 (-82.72%)
Mutual labels:  deno
event
📆 Strictly typed event emitter with asynciterator support
Stars: ✭ 30 (-81.48%)
Mutual labels:  deno
marky
A modular and extensible ESM and Deno Markdown parser.
Stars: ✭ 16 (-90.12%)
Mutual labels:  deno
pgsql-ast-parser
Yet another simple Postgres SQL parser
Stars: ✭ 152 (-6.17%)
Mutual labels:  deno
wasm
fast wasm modules
Stars: ✭ 37 (-77.16%)
Mutual labels:  deno
coreutils
🦕 Cross-platform Deno rewrite of the GNU Coreutils
Stars: ✭ 22 (-86.42%)
Mutual labels:  deno
denobyexample
Deno by example - short examples showcasing how to use Deno
Stars: ✭ 72 (-55.56%)
Mutual labels:  deno
cache
🥌 Deno cache library
Stars: ✭ 38 (-76.54%)
Mutual labels:  deno
rhum
A test double library
Stars: ✭ 92 (-43.21%)
Mutual labels:  deno
create-xc-app
⚡️ Create a project in seconds!
Stars: ✭ 15 (-90.74%)
Mutual labels:  deno
api-deno-compiler
This is an api that execute your deno code and send you the output
Stars: ✭ 13 (-91.98%)
Mutual labels:  deno
wocket
A WebSocket library for Deno
Stars: ✭ 103 (-36.42%)
Mutual labels:  deno
dps-dial.vim
Increment/decrement plugin using denops.vim
Stars: ✭ 21 (-87.04%)
Mutual labels:  deno
crux.land
crux.land is a free registry service meant for hosting small (≤ 20kB) single deno scripts.
Stars: ✭ 50 (-69.14%)
Mutual labels:  deno
postgres-deno
A PostgreSQL extension for Deno: run Typescript in PostgreSQL functions and triggers.
Stars: ✭ 87 (-46.3%)
Mutual labels:  deno

deno_doc

A Rust crate to generate documentation for JavaScript and TypeScript modules.

This crate powers deno doc, but is not Deno specific and can be used to write documentation generators for other targets like Node or the browser as well.

Usage from Deno CLI or Deploy

This repository includes a compiled version of the Rust crate as Web Assembly and exposes an interface which is available via the mod.ts and can be imported like this:

import { doc } from "https://deno.land/x/deno_doc@{VERSION}/mod.ts";

Where {VERSION} should be substituted with the specific version you want to use.

doc()

The doc() function takes a string URL module specifier and potentially some options, and asynchronously resolves with an array of documentation nodes, which represent the surface API of the module.

A minimal example of using doc() and printing out some information about a function:

import { doc } from "https://deno.land/x/deno_doc@{VERSION}/mod.ts";

const colorsDoc = await doc("https://deno.land/std/fmt/colors.ts");

for (const node of colorsDoc) {
  console.log(`name: ${node.name} kind: ${node.kind}`);
}

The doc() function needs a way to retrieve modules, and by default uses a load() function provided by deno_graph which uses fetch() for remote modules and Deno.readFile() for local modules. This means that doc() will require that appropriate read/net permissions to function properly. It will prompt for them if not provided at startup.

DocNode

The foundational type for the documentation is the DocNode and is exported from the mod.ts.

Rust Example

examples/ddoc/main.rs provides a minimal standalone binary demonstrating how deno_doc can be used as a crate.

$ cargo run --example ddoc ../deno_std/http/mod.ts

Developing

# build all targets
$ cargo build --all-targets

# test it
$ cargo test

Contributing

Submitting a Pull Request

Before submitting, please make sure the following is done:

  1. That there is a related issue and it is referenced in the PR text.
  2. There are tests that cover the changes.
  3. Ensure cargo test passes.
  4. Format your code with rustfmt --check src/lib.rs
  5. Make sure cargo clippy --all-targets --release --locked -- -D clippy::all passes.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].