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

antlers-formatter

v1.2.14

Published

Formats Antlers template files.

Downloads

28

Readme

Antlers Formatter CLI

The Antlers formatter CLI is an opinionated formatting tool built on top of js-beautify, and is provided as a standalone version of the formatter that ships with the Visual Studio Code extension.

Installation

The command line Antlers formatter can be installed with npm using the following command:

npm install antlers-formatter -g

The format command accepts the following options:

| Option | Flag | Description | |---|---|--| | file | --f | The path to the template to format. | | dir | --d | A directory path to format all Antlers files, recursively. | | output | --out | An optional file path where the formatted results will be saved. When specified, the file (or files in a directory) is not overwritten. | | dump | --dd | When specified, no results are saved to disk. Formatted results are displayed within the terminal. | | options | --o | An optional file path to a JSON file containing Antlers formatting settings. |

General usage:

antlersformat format --f="/path/to/file/to/format.antlers.html"

Antlers Formatting Settings

The default Antlers formatter settings look like this when saved as JSON:

{
    "htmlOptions": {},
    "formatFrontMatter": true,
    "insertSpaces": true,
    "maxStatementsPerLine": 3,
    "tabSize": 4,
    "formatExtensions": [
        ".antlers.html"
    ]
}
  • formatFrontMatter - Controls whether document Front Matter is formatted.
  • insertSpaces - Controls whether the Antlers formatter should insert spaces
  • maxStatementsPerLine - Suggests a maximum number of Antlers statements that should appear on a single line (i.e., {{ test; test += 3; test += 5; }})
  • tabSize - The number of spaces to use for indentation
  • formatExtensions - A list of file extensions that will be formatted when formatting a directory.

The htmlOptions object may be used to set the HTML formatting options used by the Antlers formatter. These settings follow the same rules as the default Visual Studio Code HTML Formatter. The formatter will do its best to respect these settings, but may be unable to under certain circumstances.

  • htmlOptions.indentEmptyLines
  • htmlOptions.wrapLineLength
  • htmlOptions.unformatted
  • htmlOptions.indentInnerHtml
  • htmlOptions.wrapAttributes
  • htmlOptions.wrapAttributesIndentSize
  • htmlOptions.preserveNewLines
  • htmlOptions.indentHandlebars
  • htmlOptions.endWithNewline
  • htmlOptions.extraLiners
  • htmlOptions.indentScripts
  • htmlOptions.unformattedContentDelimiter

Reporting Issues

If you come across an issue, or have a suggestion to improve Antlers Toolbox, feel free to create an issue on the project's GitHub repository here:

https://github.com/Stillat/vscode-antlers-language-server/issues

If you are looking to report a security vulnerability, please do not create an issue on the GitHub repository.

To report sensitive issues or a security vulnerability please email [email protected] with the relevant details.

Emails requesting information on bounties, etc. will not be responded to.

License

This formatter utility is open-sourced software licensed under the MIT license.