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 🙏

© 2025 – Pkg Stats / Ryan Hefner

features2html

v1.3.0

Published

Creates HTML files from Feature Files

Readme

features2html

Convert BDD feature files to HTML

What is features2html?

features2html is a simple script that creates HTML based documentation from Cucumber features. The resulting layout is also suitable for printing as PDF from your favorite web browser.

Note that the documentation is generated from the source Cucumber feature files, and NOT from the test results (there are plenty of other tools that can do that).

Use features2html when you want to create a nice looking requirements specification, that you can email to your customer. You can focus on editing the actual feature files and let features2html make the features presentable to your customers.


Installation

npm install -g https://github.com/patrickjmcd/features2html

Usage

Demo usage

To get the feel of it, run the script without any options. This will create a sample HTML file in the subfolder output_features2html, from the example feature sources in examples/features, using the templates and css styles in default/templates:

features2html

Real world usage

Have a look at the switches available:

-h, --help                        output usage information
-V, --version                     output the version number
-i, --input-dir [path]            read feature files from path (default: examples/features)
-t, --templates-dir [path]        read the files doc_template.html, feature_template.html and style.css from path (default: default/templates)
-o, --output-file [path]          send output to file path (default: output_features2html/feature_YYYYMMDD_HHmm.html)
-p, --product-name [string]       The name of your product used in headline and header (default: My Product Name)
-a, --author [string]             The author name used in header (default: John Doe)
-b, --break-before-word [string]  create a line break before every occurrence of this word in the background (default: null)

What you normally want to do is:

  • Copy the three files in default/templates (two template files and one css file) to another folder anywhere on your computer.
  • Modify the templates and styles according to your demands. If you are happy with the demo design, all you have to do is modify the Lorem Ipsum intro text in the template file doc_template.html.
  • Use switches to point to your folders for templates and features.

Example:

features2html -i path-to-your-feature-file-folder -t path-to-your-modified-templates-folder -a "Your Name" -p "Your Product Name" 

Things to note

  • All feature files in the input folder will be processed in alphabetical order. If you want specific ordering of your features in the output, I suggest that you rename your feature files with number prefixes, like 100_featurename.feature 110_featurename.feature etc.
  • The feature files folder will not be processed recursively.
  • You can add a special comment before any of your scenarios, #sidenote: followed by your sidenote comment. In the default design, these comments will be rendered to the right of the scenario (see example features in examples/features.