Chore: Add npm build hooks (#649)
This commit is contained in:
parent
bab8e541b0
commit
8287c84588
|
@ -91,3 +91,6 @@ exclude = [
|
|||
|
||||
[tool.hatch.build.hooks.vcs]
|
||||
version-file = "src/pytest_html/__version.py"
|
||||
|
||||
[tool.hatch.build.hooks.custom]
|
||||
path = "scripts/npm.py"
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
import subprocess
|
||||
|
||||
from hatchling.builders.hooks.plugin.interface import BuildHookInterface
|
||||
|
||||
|
||||
class NpmBuildHook(BuildHookInterface):
|
||||
def initialize(self, version, build_data):
|
||||
subprocess.check_output("npm install", shell=True)
|
||||
subprocess.check_output("npm run build", shell=True)
|
Loading…
Reference in New Issue