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 🙏

© 2026 – Pkg Stats / Ryan Hefner

generator-parse

v0.1.1

Published

A Yeoman generator to generate files from markdown templates

Readme

generator-parse

A Yeoman generator that bootstraps a project from a markdown file containing fenced Liquid code blocks.

Usage

npx yo parse [source]

source can be:

| Form | Description | | ---------------------------------- | -------------------------------------------------------------------------- | | https://example.com/template.md | Any https:// or http:// URL | | github:user/repo | Fetches README.md from the GitHub repo's default branch | | github:user/repo/path/to/file.md | Fetches a specific file from a GitHub repo | | example | Built-in template bundled with the generator (see Templates) |

If source is omitted, the generator will prompt for it interactively. When the source is a remote URL or github: shorthand, the generator will ask for confirmation before making any network request.

Template data

The following variables are available in every Liquid template block:

| Variable | Type | Description | | ------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------- | | packageJson | object proxy | Live proxy over the destination package.json. Useful for reading the project name, version, or existing dependencies. |

Example:

{
  "name": "{{ packageJson.name | default: 'my-project' }}",
  "version": "{{ packageJson.version | default: '0.0.1' }}"
}

Template format

The markdown file may contain any text. Only fenced code blocks tagged with liquid and a filename are processed.

Note on Liquid delimiters: The generator uses custom delimiters for Liquid output: {{{ and }}} instead of the standard {{ and }}. This allows expressions (which use {{ ... }}) to pass through unchanged in generated workflow files without requiring {% raw %} blocks.

# My Project

Some description here.

```liquid package.json
{
  "name": "my-project",
  "version": "1.0.0"
}
```

```liquid src/index.ts
export const greeting = '{{ name }}';
```

Each block is rendered through LiquidJS and written to the destination path.

Why Liquid instead of EJS? EJS is the default templating engine used by Yeoman's own scaffolding helpers, but it executes arbitrary JavaScript (<% ... %> scriptlets), which makes it unsafe for templates fetched from untrusted sources. LiquidJS is sandboxed by design — it can only perform data transformations via {{ variable }} and {% tag %} syntax and has no access to the Node.js runtime.

Templates

Built-in templates live in generators/app/templates/. Pass the filename (with or without .md) as the source argument:

| Name | Description | | ----------------------- | ----------------------------------------------------------------------------- | | example | Minimal project with package.json, src/index.js, and README.md | | release-please-action | Release Please workflow template with optional workspace and prettier support |

Examples

# From a public URL
yo parse https://raw.githubusercontent.com/mshima/generator-parse/main/generators/app/templates/example.md

# From a GitHub repo (README.md)
yo parse github:mshima/generator-parse

# From a specific file in a GitHub repo
yo parse github:mshima/generator-parse/generators/app/templates/example.md

# Using a built-in template
yo parse example

# Using the release workflow template
yo parse release-please-action

Development

npm test         # run tests
npm run lint     # eslint
npm run format   # prettier
npm run coverage # vitest coverage