Skip to content

Commit

Permalink
refactor: remove unnecessary variable
Browse files Browse the repository at this point in the history
  • Loading branch information
raymond-u committed Mar 15, 2024
1 parent 689d87e commit 93b3995
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
5 changes: 0 additions & 5 deletions src/lungo_cli/core/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,6 @@ def web_app_info(self) -> list[dict[str, str | None]]:
for plugin_output in self.plugin_outputs
]

@property
def web_extra_dependencies(self) -> list[str]:
return [dep for plugin_output in self.plugin_outputs for dep in plugin_output.web_dependencies]

@property
def context(self) -> Context:
return Context(
Expand All @@ -121,5 +117,4 @@ def context(self) -> Context:
dev=self.dev,
ip_addresses=self.ip_addresses,
web_app_info=self.web_app_info,
web_extra_dependencies=self.web_extra_dependencies,
)
1 change: 0 additions & 1 deletion src/lungo_cli/models/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ class Context(Base):
dev: bool
ip_addresses: dict[str, IPv4Address]
web_app_info: list[dict[str, str | None]]
web_extra_dependencies: list[str]
6 changes: 4 additions & 2 deletions src/lungo_cli/resources/web/Dockerfile.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ FROM docker.io/library/node:{{ NODE_VER }} AS builder
WORKDIR /app
COPY package.json pnpm-lock.yaml .
RUN corepack enable && pnpm install --frozen-lockfile && \
{% for dep in web_extra_dependencies %}
pnpm add '{{ dep }}' && \
{% for plugin_output in plugin_outputs %}
{% for dependency in plugin_output.web_dependencies %}
pnpm add '{{ dependency }}' && \
{% endfor %}
{% endfor %}
mv package.json package.json.bak && mv pnpm-lock.yaml pnpm-lock.yaml.bak
COPY . .
Expand Down

0 comments on commit 93b3995

Please sign in to comment.