Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit

Permalink
Simplify dependency installation UI
Browse files Browse the repository at this point in the history
  • Loading branch information
erik-shopify authored Jun 1, 2020
1 parent 7bb6711 commit 7e2cd5b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ def self.bootstrap(ctx:, language:, extension_point:, script_name:)

def self.install(ctx:, language:, extension_point:, script_name:)
dep_manager = Infrastructure::DependencyManager.for(ctx, language, extension_point, script_name)
return ctx.puts(ctx.message('script.project_deps.deps_are_installed')) if dep_manager.installed?

unless CLI::UI::Frame.open(ctx.message('script.project_deps.installing_with_npm')) do
unless CLI::UI::Frame.open(ctx.message('script.project_deps.checking_with_npm')) do
return ctx.puts(ctx.message('script.project_deps.none_required')) if dep_manager.installed?
begin
UI::StrictSpinner.spin(ctx.message('script.project_deps.installing')) do |spinner|
dep_manager.install
Expand Down
6 changes: 3 additions & 3 deletions lib/project_types/script/messages/messages.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ module Messages
},

project_deps: {
deps_are_installed: "{{v}} Dependencies installed",
installing_with_npm: "Installing dependencies with npm",
none_required: "{{v}} None required",
checking_with_npm: "Checking dependencies with npm",
installing: "Dependencies installing",
installed: "Dependencies installed",
installed: "Missing dependencies installed",
},

test: {
Expand Down

0 comments on commit 7e2cd5b

Please sign in to comment.