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

marked-it-cli

v2.4.5

Published

A CLI for marked-it. Performs markdown->HTML and (optionally) TOC generation for a collection of markdown source files.

Downloads

1,242

Readme

marked-it-cli

A command-line interface for marked-it that adds support for conref attributes, uniform headers/footers, and .pdf generation. Check out the full documentation for marked-it.

Install

npm install -g marked-it-cli

You may need to sudo the above command since it installs globally.

Usage

marked-it-cli <sourceDirectory> --output=<destinationDirectory> [OPTIONS]

Required Arguments

<sourceDirectory>
	The path of the directory containing source Markdown files.  Subdirectories will be recursed.
	
--output
	The path of the directory to write generated files to.  Directory structures from the source directory will be replicated here.

options

--overwrite
	Overwrite output files that already exist
--disable-attributes
	Disable processing of Kramdown-style attribute lists
--disable-front-matter
	Disable processing of Jekyll-style front matter blocks
--toc-xml
	Generate a toc.xml file for directories containing a valid toc file
--toc-depth=<maxHeaderLevel>
	Set the maximum header level that will appear in toc files (default=3)
--verbose
	Output verbose details
--debug
	Output even more verbose details
--gen-pdf
	Generate .pdf files
--pdf-options-file=<pdfOptionsFile>
	Path to the file with PDF generation options
--header-file=<headerSourceFile>
	Path to the file with content to be prepended to the generated .html
--footer-file=<footerSourceFile>
	Path to the file with content to be appended to the generated .html
--conref-file=<conrefFile>
	Path to the file containing DITA-style variable definitions

PDF Generation

For PDF file generation to succeed, wkhtmltopdf must be installed and the path to its binary must be in the OS' PATH environment variable. Note that on Windows the wkhtmltopdf arch (32-/64-bit) must match that of the node.js being used.

If --pdfOptionsFile is not specified then all default options will be used. Custom options are specified in strict JSON format as the camel-cased equivalents of the options described in the wkhtmltopdf options. For an example see included file example/examplePDFoptions.

Example

The "examples" directory demonstrates the CLI's features. To generate it use command:

node ./bin/marked-it-cli ./example --output=./exampleOutput --extension-file=./example/headerFooterExt.js --gen-pdf --pdf-options-file=./example/pdfOptions --keyref-file=./example/keyref.yaml --toc-xml