Skip to content
PluginStats

@grgmddn/prettier-plugin-velocity-html weekly downloads statistics

By grgmddn · npm · Prettier plugins

Prettier 3 plugin for formatting HTML containing Velocity code

View on npm Fresh · Dec 6, 2026

@grgmddn/prettier-plugin-velocity-html has 32 recorded weekly downloads on npm, a change of -91.4% over the past 7 days, ranking #2887 of 3,247 tracked listings.

Weekly downloads
32
Official API · Dec 5, 2026
7-day growth
-91.4%
-338 weekly downloads
30-day growth
—
Insufficient history
90-day growth
—
Insufficient history
Rank
#2887
Among tracked npm listings

About @grgmddn/prettier-plugin-velocity-html

@grgmddn/prettier-plugin-velocity-html

A Prettier 3 plugin that formats HTML containing Apache Velocity code.

This is a fork of fvclaus/prettier-plugin-velocity-html, updated for Prettier 3. If you are on Prettier 2, use the original package. See Attribution.

Installation

Install the plugin as a dev dependency:

npm install --save-dev prettier @grgmddn/prettier-plugin-velocity-html

Then add it to your Prettier configuration:

// .prettierrc
{
  "plugins": ["@grgmddn/prettier-plugin-velocity-html"]
}

Or, with a JavaScript config:

// prettier.config.mjs
export default {
  plugins: ["@grgmddn/prettier-plugin-velocity-html"],
};

Files ending in .vm are formatted automatically. For other extensions, set the parser in an override:

{
  "plugins": ["@grgmddn/prettier-plugin-velocity-html"],
  "overrides": [{ "files": "*.htm", "options": { "parser": "velocity-html" } }]
}

Usage

CLI
npx prettier --write "src/**/*.vm"

To load the plugin without a config file:

npx prettier --plugin=@grgmddn/prettier-plugin-velocity-html --write "src/**/*.vm"
API
import * as prettier from "prettier";

const output = await prettier.format(source, {
  parser: "velocity-html",
  plugins: ["@grgmddn/prettier-plugin-velocity-html"],
});

Motivation

Prettier's HTML parser is robust and can parse most Velocity code. There are only two cases it can't handle:

  • HTML elements inside Velocity strings: #set($htmlElement = "<div>")
  • Velocity fragments that aren't well-formed HTML on their own, such as a footer.vm containing </div></div><div>Footer text ...</div></body></html>

Even where Prettier can parse Velocity HTML, it is unlikely to improve the formatting. It treats every Velocity directive as text and lays it out as such:

Original

#set ($serviceName = $context.serviceName)
#if ($serviceName)
  <legend>
        #encodeForHTML($serviceName)
    </legend>
#else
    <legend>
        Login to anonymous service
    </legend>
#end

Prettier HTML

#set ($serviceName = $context.serviceName) #if ($serviceName)
<legend>#encodeForHTML($serviceName)</legend>
#else
<legend>Login to anonymous service</legend>
#end

Prettier Velocity HTML

#set($serviceName = $context.serviceName)
#if($serviceName)
  <legend>#encodeForHTML($serviceName)</legend>
#else
  <legend>Login to anonymous service</legend>
#end

How it works

Elements are rendered in one of two modes, block or inline:

  • Block elements break their children uniformly. Whitespace is not significant, and opening and closing tags are never broken.
  • Inline elements fill as much horizontal space as possible. Whitespace is significant, so the opening or closing tag is broken where necessary to avoid inserting whitespace that was not in the original code.

The mode is chosen from the element name. It describes how elements are laid out in code, not how a browser renders them. Block mode is used to improve readability wherever whitespace has no meaning.

Inline

<span> inline </span><span> inline </span> <span> inline </span><span>
  inline</span
>

Block

<datalist id="colors">
  <option>Blue</option>
  <option>Green</option>
</datalist>

The plugin ships with its own HTML parser, tested against all relevant test cases from Prettier's HTML parser. Output is not always identical to Prettier's HTML formatter, because some cases were simplified to avoid the complexity of Prettier's codebase.

What's different in this fork

  • Supports Prettier v3. Prettier 2 is no longer supported; use the original package for v2.
  • Dual ESM/CJS builds, Node.js >=18.
  • No runtime dependencies.
  • Published as the scoped package @grgmddn/prettier-plugin-velocity-html.
  • The hosted Playground has been removed.
  • Parser generated with antlr-ng, built with tsdown, tested with node:test. Java is not required to generate the lexer.

Contributing

npm install
npm run build     # generate the parser and bundle
npm test          # build, then run the test suite
npm run verify    # format check, lint and type check

Issues and pull requests are welcome at grgmddn/prettier-plugin-velocity-html.

Attribution

This package is a fork of prettier-plugin-velocity-html by Frederik Claus, updated for compatibility with Prettier v3. The original design, parser, motivation and tests described above are his work.

Description from the npm listing.

  • prettier
  • prettier-plugin
  • velocity

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

@grgmddn/prettier-plugin-velocity-html weekly downloads on npm, last 90 days: 32 weekly downloads as of Dec 5, 2026.@grgmddn/prettier-plugin-velocity-htmlWeekly downloads on npm · Last 90 days32downloads / week050100150200250300350400Sep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
@grgmddn/prettier-plugin-velocity-html weekly downloads on npm, last 90 days: 32 weekly downloads as of Dec 5, 2026.

7/30/90-day growth

@grgmddn/prettier-plugin-velocity-html weekly downloads growth on npm: -91.4% over 7 days, 30-day growth unavailable, 90-day growth unavailable.@grgmddn/prettier-plugin-velocity-htmlWeekly downloads growth on npm32downloads / week now7-day growth-338 weekly downloads-91.4%30-day growth+32 weekly downloadsInsufficient history90-day growth+32 weekly downloadsInsufficient historyGrowth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
@grgmddn/prettier-plugin-velocity-html weekly downloads growth on npm: -91.4% over 7 days, 30-day growth unavailable, 90-day growth unavailable.

Ranking history

@grgmddn/prettier-plugin-velocity-html npm ranking history: currently #2887 (by weekly downloads).@grgmddn/prettier-plugin-velocity-htmlnpm ranking · by weekly downloads · Last 90 days#2887current rank#1800#2000#2200#2400#2600#2800#3000Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankNov 30, 2026 – Dec 6, 2026 · 7 observations · Updated Dec 5, 2026pluginstats.com
@grgmddn/prettier-plugin-velocity-html npm ranking history: currently #2887 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 145, #9 (overall #2,889)
All npm: every listing in weekly downloads order

Listing placement

Prettier plugins267 listings · 14 pages · page 8, #8 (overall #148)
Prettier plugins: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (121)
Recent weekly downloads observations for @grgmddn/prettier-plugin-velocity-html
Date (UTC)Weekly downloadsChange vs. previous
32+3
290
29-2
31-11
42-20
62-14
76-294
370+5
365+3
362+2
360+12
348+25
323+18
305—

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/@grgmddn/prettier-plugin-velocity-html. First seen Nov 30, 2026; last successful collection Dec 6, 2026. See the methodology.