npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

build-api-docs-from-bruno

v1.1.15

Published

A command-line tool for generating API documentation from the documentation in a Bruno collection.

Downloads

1,180

Readme

build-api-docs-from-bruno

NPM Version NPM Unpacked Size

NPM License GitHub last commit NPM Downloads

Coverage

Table of Contents

Description Usage

Contributing Changelog

Enhancements for Future Versions

Description

This command line tool will build API documentation from Bruno collection (.bru) files. Each of these files contains an optional docs section which contains Markdown documentation for the endpoint. This tool will parse the .bru files and generate a single Markdown file containing the documentation for each endpoint. The resulting Markdown file will be saved to the output directory.

Usage

Environment Variables

| Variable Name | Description | Values | Default Value | | ------------- | ---------------------------------------------------------------------------------- | ----------------------------------------------------------- | ------------- | | LOG_LEVEL | The level of logging to use for the log file. Console log level is always info. | errorwarninfoverbosedebug | verbose |

From the root directory of the project, run the following command:

npx build-api-docs-from-bruno@latest [command] {options}

Global Options

| Switch | Type | Default | Required | Description | | ---------------- | --------- | ------- | -------- | ---------------------------------------------- | | -q --silent | boolean | false | Optional | Suppresses all output to the console. | | -r --verbose | boolean | false | Optional | Outputs additional information to the console. | | --help | | | | Displays help information. | | -v --version | | | | Displays version information. |

Commands

Default

build

Builds the API documentation from the Bruno collection files.

| Switch | Type | Default | Required | Description | | -------------------- | --------- | ------- | -------- | ----------------------------------------------------------------------- | | -s --source | string | | Required | The path to the source directory containing the Bruno collection files. | | -d --destination | string | | Required | The path to the output directory. | | -t --test | boolean | false | Optional | Test the build process without writing the output file. |

Examples

Examples will be provided in a future release.

License

GNU General Public License (GPL)

This software is licensed under the GNU General Public License (GPL). The GPL allows users to freely use, copy, modify, and distribute this software under the following conditions:

  • Any modified versions of this software must also be licensed under the GPL.

  • The original or modified software cannot be sold or used for profit.

  • The source code must be made available when distributing the software.

For more detailed information, please visit the official GNU GPL website.

Contributing

To contribute, contact RamonaSteve.

Change Log

Release 1.1.15

  • [x] Remove console logging for debugging file transport

Release 1.1.14

  • [x] Add exception handling for file transport

Release 1.1.13

  • [x] Added console logging for debugging file transport

Release 1.1.12

  • [x] Refactor logger to enhance logged information
  • [x] Revert console log level to info
  • [x] Add environment variable usage to README.md
  • [x] Enhance logging for file overwrite
  • [x] Remove deprecated code
  • [x] Correct path for saving configuration file

Release 1.1.11

  • [X] Added more debug code

Release 1.1.10

  • [X] Correct path for retrieval of Bruno files

Release 1.1.9

  • [X] Add additional logging
  • [X] Correct path for retrieval of Bruno files

Release 1.1.8

  • [X] Correct file path for source files

Release 1.1.7

  • [X] Update console log level to debug
  • [X] Correct file path for output file

Release 1.1.6

  • [X] Add publishConfig to package.json
  • [X] Set console logging to Verbose for debugging
  • [X] Update TOC in README.md

Release 1.1.5

  • [X] Add function to get logger's file transport path
  • [X] Write log file path to console at startup
  • [X] Remove unneeded debug code

Release 1.1.4

  • [X] Add debug code for logging

Release 1.1.3

  • [X] Fix regular expression for configuration file name

Release 1.1.2

  • [X] Fix output path for logger
  • [X] Fix location for default configuration file
  • [X] Fix location for all file reads and writes

Release 1.1.1

  • [X] Remove CSS styling from README.md

Release 1.1.0

  • [X] Add error handling for source directory not existing
  • [X] Add header content from header.md or a specified file
  • [X] Add interactive mode
  • [X] Add silent mode
  • [X] Add support for a list of files or directories to exclude that are in the source path and end with .bru
  • [X] Add tail content from tail.md or a specified file
  • [X] Add test mode to run process and check for errors but not writing output file
  • [X] Add verbose mode
  • [X] Allow input of source path, output path and output file name
  • [X] Display message if no command is provided
  • [X] Make default command guided and remove the guided command
  • [X] Update README.md
  • [X] Update unit tests; target 80% coverage

Enhancements in Progress

None

Enhancements for future versions

  • [ ] Add example to README.md
  • [ ] Convert from tsc to swc
  • [ ] Correct npm badge in README.md
  • [ ] Ensure all functions have current documentation
  • [ ] Update Commands in README.md
  • [ ] Update Examples in README.md
  • [ ] Update Global Options in README.md