Class: Packwerk::Commands::InitCommand
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- Packwerk::Commands::InitCommand
- Extended by:
- T::Sig
- Defined in:
- lib/packwerk/commands/init_command.rb
Instance Method Summary collapse
Methods inherited from BaseCommand
Constructor Details
This class inherits a constructor from Packwerk::Commands::BaseCommand
Instance Method Details
#run ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/packwerk/commands/init_command.rb', line 12 def run out.puts("📦 Initializing Packwerk...") configuration_file = Generators::ConfigurationFile.generate( root: configuration.root_path, out: out ) root_package = Generators::RootPackage.generate(root: configuration.root_path, out: out) success = configuration_file && root_package if success out.puts("\n \u{1F389} Packwerk is ready to be used. You can start defining packages and run `bin/packwerk check`.\n For more information on how to use Packwerk, see: https://github.com/Shopify/packwerk/blob/main/USAGE.md\n EOS\n else\n out.puts(<<~EOS)\n\n \u26A0\uFE0F Packwerk is not ready to be used.\n Please check output and refer to https://github.com/Shopify/packwerk/blob/main/USAGE.md for more information.\n EOS\n end\n\n success\nend\n") |