Skip to content

Commit

Permalink
also check for package.json at project root
Browse files Browse the repository at this point in the history
  • Loading branch information
sheppard committed Mar 20, 2024
1 parent e7a1596 commit fee2980
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion wq/build/management/commands/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ def call_command_with_config(self, name, *args, rel_path=False):
call_command(name, *args, **conf)

def npm_build(self):
app_dir = self.config.path.parent / "app"
root_dir = self.config.path.parent
app_dir = root_dir / "app"
if app_dir.exists() and (app_dir / "package.json").exists():
subprocess.check_call([NPM_COMMAND, "run", "build"], cwd=app_dir)
elif (root_dir / "package.json").exists():
subprocess.check_call([NPM_COMMAND, "run", "build"], cwd=root_dir)

0 comments on commit fee2980

Please sign in to comment.