From 7a0080cec9da138bfb7ce86069542d0f5587f58c Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Fri, 20 May 2022 08:16:21 -0500 Subject: [PATCH] Fix artifact config for hatch (#850) * fix artifact config * add before-build-python stage --- package.json | 3 +-- pyproject.toml | 5 ++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index ee9cf226bd..d4c9c73c2a 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,7 @@ "version": "1.0.0", "license": "BSD", "scripts": { - "build": "copyfiles -f node_modules/bootstrap/dist/css/*.min.* jupyter_server/static/style", - "postinstall": "npm run build" + "build": "copyfiles -f node_modules/bootstrap/dist/css/*.min.* jupyter_server/static/style" }, "dependencies": { "bootstrap": "^3.4.0", diff --git a/pyproject.toml b/pyproject.toml index 104ff3a5b1..917334e314 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,7 +76,7 @@ test = [ jupyter-server = "jupyter_server.serverapp:main" [tool.hatch.build] -artifacts = ["jupyter_server/static/style/*.*"] +artifacts = ["jupyter_server/static/style"] [tool.black] line_length = 100 @@ -104,6 +104,9 @@ filterwarnings = [ [tool.jupyter-releaser] skip = ["check-links"] +[tool.jupyter-releaser.hooks] +before-build-python = ["npm install", "npm run build"] + [tool.jupyter-releaser.options] post-version-spec = "dev" pydist_resource_paths = ["jupyter_server/static/style/bootstrap.min.css", "jupyter_server/static/style/bootstrap-theme.min.css"]