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

highlightjs-dax

v1.1.0

Published

DAX (Data Analysis Expressions) language definition for highlight.js with an optional theme.

Readme

highlightjs-dax

DAX (Data Analysis Expressions) language definition for highlight.js.

This package provides syntax highlighting for DAX.

Installation

# npm
npm install highlightjs-dax

# pnpm
pnpm install highlightjs-dax

Usage

Register with highlight.js

import hljs from "highlight.js"
import dax from "highlightjs-dax"

hljs.registerLanguage("dax", dax)

Use the DAX Theme CSS

If you want the public theme asset exposed by this package, import the compiled CSS:

import "highlightjs-dax/theme.css"

The current public theme entry is the compiled CSS file.

Local Development

This project uses Vite+ for development and building.

Setup

vp install

Development

Run the local demo page with the Vite dev server:

vp dev

Watch Build

If you want to keep the package build running in watch mode, use the package script:

vp run dev

Testing

Run the test suite:

vp test

Check and Lint

Run type checks, linting, and formatting:

vp check

Build

Create a publish-ready build. The current vite.config.ts packs ESM + CJS outputs, minifies the library bundle, and compiles the compressed CSS theme on success:

vp pack

Publish from GitHub Actions

This repository uses npm Trusted Publisher with GitHub Actions OIDC. Do not configure an NPM_TOKEN secret for publishing.

Before using the workflow, open the highlightjs-dax package settings on npmjs.com and configure a Trusted Publisher that matches:

  • GitHub user or org: jiaopengzi
  • Repository: highlightjs-dax
  • Workflow filename: publish.yaml

If the workflow log shows Signed provenance statement and then fails with E404, GitHub Actions authentication is already working. In that case, the issue is usually that the package's Trusted Publisher binding or publishing access on npm does not match this repository/workflow.

With GitHub Actions, the Git tag must exactly match package.json.version, and it must not include a v prefix.

For prerelease versions such as 1.0.0-beta1, npm requires an explicit dist-tag. This repository's workflow publishes prerelease versions with the beta tag, and stable versions with the default latest tag.

Examples:

# stable release
git tag 1.0.0
git push origin 1.0.0

# prerelease
git tag 1.0.0-beta1
git push origin 1.0.0-beta1

License

MIT