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

markdowner-cli

v1.1.1

Published

![logo](assets/logo.png)

Downloads

17

Readme

logo

Codacy grade

markdowner-cli

A command-line tools crafted with love ❤️ and code 💻 to make your life easier when working with markdown-based documentation.

What can Markdowner CLI do for you ?

  1. An easy way to create documents for your code, using code 😀.
  2. Don't rewrite your code in your README/MD files anymore.
  3. Automatically generate different parts your document just by using comments, and markdowner off course 🤪.
  4. More features to be added .... 👍.

How to use

npm install -g markdown-cli
markdowner READE.md

Analogy

Add comments as follows:

<!-- MD[<TYPE>](<source path with extension>)[<OPTIONS>] -->

<!-- MD[/<TYPE>] -->

Supported Types

| Type | Description | | ------------ | ---------------------------------------------------------------------------------------------------------- | | CODE_SNIPPET | Replace with content form a file with syntax highlighting and code block. | | JSON | Get json content with desired options with path of the key/s to extract. | | MAKEFILE | Get content from Makefile (use .mk extension with makefile). EIther the whole file or a set of commands. |

We have two tpe of options

| Option | Example | Description | | --------- | ---------------------------------- | ----------------------------------------------------------- | | START END | [1:5] | Start from 1st line and read up to the 5th line. | | CSV | [name,version,], [author[9].url,] | comma separated values of the entities you want to extract. |

Features

Replaces MD comments with either generated values of content from other files.

Replace Code blocks with syntax highlighting

Simply substitute content from a file to your document.

replaces:

<!-- MD[CODE_SNIPPET](test/assets/snippets/js/test.js)[] -->

<!-- MD[/CODE_SNIPPET] -->

with:

<!-- MD[CODE_SNIPPET](test/assets/snippets/js/test.js)[] -->

    ```js
    const a = 10
    const b = 20
    const c = a + b
    console.log(c)
    ```

<!-- MD[/CODE_SNIPPET] -->

When substituting form a json file, specify the json paths to pick data from

replaces:

replaces:

<!-- MD[CODE_SNIPPET](package.json)[version,] -->

<!-- MD[/CODE_SNIPPET] -->

with

<!-- MD[CODE_SNIPPET](package.json)[version,] -->

    ```json
    {
        "version": "1.1.0"
    }
    ```

<!-- MD[/CODE_SNIPPET] -->

When substituting from MAKEFILE use .mk extension.

replaces:

<!-- MD[MAKEFILE](test/assets/MAKEFILE.mk)[] -->

<!-- MD[/MAKEFILE] -->

with:

<!-- MD[MAKEFILE](test/assets/MAKEFILE.mk)[] -->

    ```sh
    all_files_and_dir:
        ls -la
    .phony: run_image

    run_image:
        docker run -p 5000:80 --rm \
        --name $(MODULE_NAME) \
        --env-file=./config.env $(ACCOUNT_NAME)/$(MODULE_NAME):$(VERSION_TAG)
    .phony: run_image
    ```

<!-- MD[/MAKEFILE] -->

Specify what command you want to pull form the MAKEFILE.

replaces:

<!-- MD[MAKEFILE](test/assets/MAKEFILE.mk)[run_image,] -->

<!-- MD[/MAKEFILE] -->

with:

<!-- MD[MAKEFILE](test/assets/MAKEFILE.mk)[run_image,] -->

    ```sh
        docker run -p 5000:80 --rm \
        --name $(MODULE_NAME) \
        --env-file=./config.env $(ACCOUNT_NAME)/$(MODULE_NAME):$(VERSION_TAG)
    ```

<!-- MD[/MAKEFILE] -->

Specify line number to read from in a file

replaces:

<!-- MD[CODE_SNIPPET](test/assets/testFIle.txt)[2:3] -->

<!-- MD[/CODE_SNIPPET] -->

with:

<!-- MD[CODE_SNIPPET](test/assets/testFIle.txt)[2:3] -->

    ```txt
        Enim ea excepteur cillum irure culpa laborum anim pariatur nulla Lorem.
        Laborum non cillum laborum excepteur occaecat aliquip occaecat ipsum irure in reprehenderit sunt proident.
    ```

<!-- MD[/CODE_SNIPPET] -->

Parse json file just ot get the data in text format not code block

replaces:

version:

<!-- MD[JSON](package.json)[version,] -->

<!-- MD[/JSON] -->

with:

version:

<!-- MD[JSON](package.json)[version,] -->

"1.0.2"

<!-- MD[/JSON] -->

Hope you like this.

Developer:

LinkedIn GitHub