An open API service indexing awesome lists of open source software.

https://github.com/projectdiscovery/js-proto-docs

API Reference for Javascript protocol
https://github.com/projectdiscovery/js-proto-docs

Last synced: 4 months ago
JSON representation

API Reference for Javascript protocol

Awesome Lists containing this project

README

          

# js-proto-docs

Autogenerated Javascript documention of all modules/functions etc available in Nuclei Javascript Protocol

## Generate/Update HTML Docs

### Install `clean-jsdoc-theme`

refer [docs](https://www.npmjs.com/package/clean-jsdoc-theme) for more details or install using below command

```console
$ npm install -g clean-jsdoc-theme
```

### Install `jsdoc`

refer [docs](https://www.npmjs.com/package/jsdoc) for more details or install using below command

```console
$ npm install -g jsdoc
```

### Locate `clean-jsdoc-theme` directory

Its usually located at `$(npm root -g)/clean-jsdoc-theme` when installed globally

### Clone target nuclei repo and navigate to desired branch

```console
$ gh repo clone projectdiscovery/nuclei
```

### Generate docs

```console
$ jsdoc -R nuclei/docs/template-guide/javascript.mdx -r -d docs/ -t $(npm root -g)/clean-jsdoc-theme nuclei/v2/pkg/js/generated/js
```

> If above command fails, try updating paths
> Here's expected command
>
> jsdoc -R [Homepage.md] -r -d api_reference -t [optional: jsdoc theme to use] generated/js

### Verify generated docs

```console
$ cd docs && simplehttpserver
```

### Contributing

If you want to update / fix something in docs etc . Please update docs present at https://github.com/projectdiscovery/nuclei/tree/main/v2/pkg/js/generated/js and then follow above steps to generate docs and create a PR with updated docs.