Fix build
This commit is contained in:
parent
7ff57924ae
commit
ec2cad5e67
|
@ -12,6 +12,9 @@
|
||||||
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
|
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
|
||||||
"format": "prettier --write src/"
|
"format": "prettier --write src/"
|
||||||
},
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18.0.0"
|
||||||
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@imengyu/vue3-context-menu": "^1.3.3",
|
"@imengyu/vue3-context-menu": "^1.3.3",
|
||||||
"@vueuse/core": "^10.4.1",
|
"@vueuse/core": "^10.4.1",
|
||||||
|
|
|
@ -13,7 +13,7 @@ class CustomBuildHook(BuildHookInterface):
|
||||||
# A hack to stop building twice on run
|
# A hack to stop building twice on run
|
||||||
if not build_data.get("force_include"):
|
if not build_data.get("force_include"):
|
||||||
return
|
return
|
||||||
stderr.write("🏗️ Building Cista frontend\n")
|
stderr.write(">>> Building Cista frontend\n")
|
||||||
npm = shutil.which("npm")
|
npm = shutil.which("npm")
|
||||||
if npm is None:
|
if npm is None:
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
|
@ -22,9 +22,9 @@ class CustomBuildHook(BuildHookInterface):
|
||||||
# npm --prefix doesn't work on Windows, so we chdir instead
|
# npm --prefix doesn't work on Windows, so we chdir instead
|
||||||
os.chdir("frontend")
|
os.chdir("frontend")
|
||||||
try:
|
try:
|
||||||
stderr.write(" 》npm install\n")
|
stderr.write("### npm install\n")
|
||||||
subprocess.run([npm, "install"], check=True) # noqa: S603
|
subprocess.run([npm, "install"], check=True) # noqa: S603
|
||||||
stderr.write("\n 》npm run build\n")
|
stderr.write("\n### npm run build\n")
|
||||||
subprocess.run([npm, "run", "build"], check=True) # noqa: S603
|
subprocess.run([npm, "run", "build"], check=True) # noqa: S603
|
||||||
finally:
|
finally:
|
||||||
os.chdir("..")
|
os.chdir("..")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user