Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

python-project-templates/hatch-js

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.