# hatch js
Hatch plugin for JavaScript builds
[](https://github.com/python-project-templates/hatch-js/actions/workflows/build.yaml)
[](https://codecov.io/gh/python-project-templates/hatch-js)
[](https://github.com/python-project-templates/hatch-js)
[](https://pypi.python.org/pypi/hatch-js)
## Overview
A simple, extensible JS build plugin for [hatch](https://hatch.pypa.io/latest/).
```toml
[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](./hatch_js/tests/) for more concrete examples.
`hatch-js` is driven by [pydantic](https://docs.pydantic.dev/latest/) models for configuration and execution of the build.
These models can themselves be overridden by setting `build-config-class` / `build-plan-class`.
## Configuration
```toml
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](https://copier.readthedocs.io/en/stable/) from the [Base Python Project Template repository](https://github.com/python-project-templates/base).
Raw data
{
"_id": null,
"home_page": null,
"name": "hatch-js",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "build, hatch, javascript, js, pnpm, python, yarn",
"author": null,
"author_email": "the hatch-js authors <t.paine154@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/1d/ac/36d969e12c5b7444883d6a211d2cee7178d9a76db58ffd8c2bbcadbdf6d3/hatch_js-0.1.0.tar.gz",
"platform": null,
"description": "# hatch js\n\nHatch plugin for JavaScript builds\n\n[](https://github.com/python-project-templates/hatch-js/actions/workflows/build.yaml)\n[](https://codecov.io/gh/python-project-templates/hatch-js)\n[](https://github.com/python-project-templates/hatch-js)\n[](https://pypi.python.org/pypi/hatch-js)\n\n## Overview\n\nA simple, extensible JS build plugin for [hatch](https://hatch.pypa.io/latest/).\n\n```toml\n[tool.hatch.build.hooks.hatch-js]\npath = \"js\"\ninstall_cmd = \"install\"\nbuild_cmd = \"build\"\ntool = \"pnpm\"\ntargets = [\"myproject/extension/cdn/index.js\"]\n```\n\nSee the [test cases](./hatch_js/tests/) for more concrete examples.\n\n`hatch-js` is driven by [pydantic](https://docs.pydantic.dev/latest/) models for configuration and execution of the build.\nThese models can themselves be overridden by setting `build-config-class` / `build-plan-class`.\n\n## Configuration\n\n```toml\nverbose = \"false\"\n\npath = \"path/to/js/root\"\ntool = \"npm\" # or pnpm, yarn, jlpm\n\ninstall_cmd = \"\" # install command, defaults to `npm install`/`pnpm install`/`yarn`/`jlpm`\nbuild_cmd = \"build\" # build command, defaults to `npm run build`/`pnpm run build`/`yarn build`/`jlpm build`\ntargets = [ # outputs to validate after build\n \"some/output.js\"\n]\n```\n\n> [!NOTE]\n> This library was generated using [copier](https://copier.readthedocs.io/en/stable/) from the [Base Python Project Template repository](https://github.com/python-project-templates/base).\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Hatch plugin for JavaScript builds",
"version": "0.1.0",
"project_urls": {
"Homepage": "https://github.com/python-project-templates/hatch-js",
"Repository": "https://github.com/python-project-templates/hatch-js"
},
"split_keywords": [
"build",
" hatch",
" javascript",
" js",
" pnpm",
" python",
" yarn"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "b0eb6b84d7b73f4e08607e346ac70adc802f2a2a2c53dcdefa0c063aece9ccd3",
"md5": "2a1fd84d4b63d7f260e1c1369dbb5357",
"sha256": "a818a2d48d1e17a8d45ff5dd64908c298b9e7d6776bd8d774166dcd7bd43df91"
},
"downloads": -1,
"filename": "hatch_js-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2a1fd84d4b63d7f260e1c1369dbb5357",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 35735,
"upload_time": "2025-08-02T14:23:59",
"upload_time_iso_8601": "2025-08-02T14:23:59.041636Z",
"url": "https://files.pythonhosted.org/packages/b0/eb/6b84d7b73f4e08607e346ac70adc802f2a2a2c53dcdefa0c063aece9ccd3/hatch_js-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "1dac36d969e12c5b7444883d6a211d2cee7178d9a76db58ffd8c2bbcadbdf6d3",
"md5": "36eec9e84fab924571ffa4c01df72bf8",
"sha256": "c5651fec665b40be79dc453ad68ca7f28eb6fa06245761f50019264133d284c6"
},
"downloads": -1,
"filename": "hatch_js-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "36eec9e84fab924571ffa4c01df72bf8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 34238,
"upload_time": "2025-08-02T14:24:00",
"upload_time_iso_8601": "2025-08-02T14:24:00.308819Z",
"url": "https://files.pythonhosted.org/packages/1d/ac/36d969e12c5b7444883d6a211d2cee7178d9a76db58ffd8c2bbcadbdf6d3/hatch_js-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-02 14:24:00",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "python-project-templates",
"github_project": "hatch-js",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "hatch-js"
}