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

grunt-sundown

v0.1.1

Published

a grunt wrapper for robotskirt(Sundown) - a C implementation of Markdown

Downloads

11

Readme

grunt-sundown

a grunt wrapper for robotskirt(Sundown) - a C implementation of Markdown

Getting Started

This plugin requires Grunt ~0.4.1

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-sundown --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-sundown');

The "sundown" task

Overview

In your project's Gruntfile, add a section named sundown to the data object passed into grunt.initConfig().

grunt.initConfig({
  sundown: {
    options: {
      extensions: {
        fenced_code: true
      },
      render_flags: {
        skip_html: true
      }
    },
    files: {
      'output.html': ['input1.md', 'input2.md']
    }
  }
})

Options

options: {
  extensions: {
    autolink: false,
    fenced_code: false,
    lax_html_blocks: false,
    no_intra_emphasis: false,
    space_headers: false,
    strikethrough: false,
    tables: false
  },
  render_flags: {
    skip_html: false,
    skip_style: false,
    skip_images: false,
    skip_links: false,
    expand_tabs: false,
    safelink: false,
    toc: false,
    hard_wrap: false,
    use_xhtml: false,
    escape: false
  },
  separator: '\n\n' // concat option for multiple files
}

Extensions Information

extensions - a hash containing the Markdown extensions which the parser will identify. The following extensions are accepted:

  • no_intra_emphasis: do not parse emphasis inside of words. Strings such as foo_bar_baz will not generate <em> tags.

  • tables: parse tables, PHP-Markdown style.

  • fenced_code_blocks: parse fenced code blocks, PHP-Markdown style. Blocks delimited with 3 or more ~ or backticks will be considered as code, without the need to be indented. An optional language name may be added at the end of the opening fence for the code block.

  • autolink: parse links even when they are not enclosed in <> characters. Autolinks for the http, https and ftp protocols will be automatically detected. Email addresses are also handled, and http links without protocol, but starting with www.

  • disable_indented_code_blocks: do not parse usual markdown code blocks. Markdown converts text with four spaces at the front of each line to code blocks. This options prevents it from doing so. Recommended to use with fenced_code_blocks: true.

  • strikethrough: parse strikethrough, PHP-Markdown style Two ~ characters mark the start of a strikethrough, e.g. this is ~~good~~ bad.

  • lax_spacing: HTML blocks do not require to be surrounded by an empty line as in the Markdown standard.

  • space_after_headers: A space is always required between the hash at the beginning of a header and its name, e.g. #this is my header would not be a valid header.

  • superscript: parse superscripts after the ^ character; contiguous superscripts are nested together, and complex values can be enclosed in parenthesis, e.g. this is the 2^(nd) time.

  • underline: parse underscored emphasis as underlines. This is _underlined_ but this is still *italic*.

  • highlight: parse highlights. This is ==highlighted==. It looks like this: <mark>highlighted</mark>

  • quote: parse quotes. This is a "quote". It looks like this: <q>quote</q>

  • footnotes: parse footnotes, PHP-Markdown style. A footnote works very much like a reference-style link: it consists of a marker next to the text (e.g. This is a sentence.[^1]) and a footnote definition on its own line anywhere within the document (e.g. [^1]: This is a footnote.).

HTML Flags Information

The following HTML flags are available:

  • skip_html: do not allow any user-inputted HTML in the output.

  • skip_images: do not generate any <img> tags.

  • skip_links: do not generate any <a> tags.

  • skip_styles: do not generate any <style> tags.

  • safelink: only generate links for protocols which are considered safe.

  • toc: add HTML anchors to each header in the output HTML, to allow linking to each section.

  • hard_wrap: insert HTML <br> tags inside on paragraphs where the origin Markdown document had newlines (by default, Markdown ignores these newlines).

  • use_xhtml: output XHTML-conformant tags. This option is always enabled in the Render::XHTML renderer.

More Information

You can try your luck on the Sundown homepage. Or check out some of the other wrappers.