This repository has been archived by the owner on Jun 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 201
class ShopifyCli::JsDeps
Paulo Margarido edited this page May 26, 2020
·
4 revisions
ShopifyCli::JsDeps ensures that all JavaScript dependencies are installed for projects.
install(ctx, verbose = false)
Proxy to instance method ShopifyCli::JsDeps.new.install.
-
ctx
: running context from your command -
verbose
: whether to run the installation tools in silent mode
ShopifyCli::JsDeps.install(ctx)
see source
# File lib/shopify-cli/js_deps.rb, line 23
def self.install(ctx, verbose = false)
new(ctx: ctx).install(verbose)
end
install(verbose = false)
Installs all of a project's JavaScript dependencies using Yarn or NPM, based
on the project's settings.
-
verbose
: whether to run the installation tools in silent mode
# context is the running context for the command
ShopifyCli::JsDeps.new(context).install(true)
see source
# File lib/shopify-cli/js_deps.rb, line 38
def install(verbose = false)
CLI::UI::Frame.open(ctx.message('core.js_deps.installing', yarn? ? 'yarn' : 'npm')) do
yarn? ? yarn(verbose) : npm(verbose)
end
ctx.done(ctx.message('core.js_deps.installed'))
end
- SmartProperties