hatch-js 0.1.2


pip install hatch-js

  Latest version

Released: Mar 03, 2026


Meta
Author: the hatch-js authors
Requires Python: >=3.10

Classifiers

Development Status
  • 3 - Alpha

License
  • OSI Approved :: Apache Software License

Programming Language
  • Python
  • Python :: 3
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13
  • Python :: 3.14
  • Python :: Implementation :: CPython
  • Python :: Implementation :: PyPy

hatch js

Hatch plugin for JavaScript builds

Build Status codecov License PyPI

Overview

A simple, extensible JS build plugin for hatch.

[tool.hatch.build.hooks.hatch-js]
path = "js"
install_cmd = "install"
build_cmd = "build"
tool = "pnpm"
targets = ["myproject/extension/cdn/index.js"]

See the test cases for more concrete examples.

hatch-js is driven by pydantic models for configuration and execution of the build. These models can themselves be overridden by setting build-config-class / build-plan-class.

Configuration

verbose = "false"

path = "path/to/js/root"
tool = "npm" # or pnpm, yarn, jlpm

install_cmd = "" # install command, defaults to `npm install`/`pnpm install`/`yarn`/`jlpm`
build_cmd = "build" # build command, defaults to `npm run build`/`pnpm run build`/`yarn build`/`jlpm build`
targets = [  # outputs to validate after build
    "some/output.js"
]

[!NOTE] This library was generated using copier from the Base Python Project Template repository.

Wheel compatibility matrix

Platform Python 3
any

Files in release

Extras:
Dependencies:
hatchling (>=1.20)
pydantic