bridgetown-core/lib/bridgetown-core/commands/new.rb
# After a new site has been created, print a success notification and
# then automatically execute bundle install from within the new site dir
# unless the user opts to skip 'bundle install'.
# rubocop:todo Metrics/CyclomaticComplexity
# rubocop:disable Metrics/PerceivedComplexity
After a new site has been created, print a success notification and
then automatically execute bundle install from within the new site dir
unless the user opts to skip 'bundle install'.
After a new site has been created print a success notification and then automatically execute bundle install from within the new site dir unless the user opts to skip ' bundle install ' .
def after_install(path, cli_path, options = {})
        git_init path
        @skipped_bundle = true 
        bundle_install path unless options["skip-bundle"]
        @skipped_yarn = true
        yarn_install path unless options["skip-yarn"]
        invoke(Apply, [], options) if options[:apply]
        invoke(Configure, options[:configure].split(","), {}) if options[:configure]
        logger = Bridgetown.logger
        bt_start = "bin/bridgetown start"
        logger.info ""
        logger.info "Success!".green, "🎉 Your new Bridgetown site was" \
                                      " generated in #{cli_path.cyan}."
        if options["skip-yarn"]
          logger.info "You can now #{"cd".cyan} #{cli_path.cyan} to get started."
          logger.info "You'll probably also want to #{"yarn install".cyan}" \
                      " to load in your frontend assets."
        else
          logger.info "You can now #{"cd".cyan} #{cli_path.cyan} and run #{bt_start.cyan}" \
                      " to get started."
        end
        logger.info "Then check out our online documentation for" \
                    " next steps: #{DOCSURL.cyan}"
        if @skipped_bundle
          logger.info "Bundle install skipped.".yellow
          logger.info "You will need to run #{"bundle binstub bridgetown-core".cyan} manually."
        end
        logger.info "Yarn install skipped.".yellow if @skipped_yarn
      end
def after_install ( path , cli_path , options = { } ) git_init path @skipped_bundle = true bundle_install path unless options [ "skip-bundle" ] @skipped_yarn = true yarn_install path unless options [ "skip-yarn" ] invoke ( Apply , [ ] , options ) if options [ :apply ] invoke ( Configure , options [ :configure ] . split ( "," ) , { } ) if options [ :configure ] logger = Bridgetown . logger bt_start = "bin/bridgetown start" logger . info "" logger . info "Success!" . green , "🎉 Your new Bridgetown site was" \ " generated in #{cli_path.cyan}." if options [ "skip-yarn" ] logger . info "You can now #{"cd".cyan} #{cli_path.cyan} to get started." logger . info "You'll probably also want to #{"yarn install".cyan}" " to load in your frontend assets." else logger . info "You can now #{"cd".cyan} #{cli_path.cyan} and run #{bt_start.cyan}" " to get started." end logger . info "Then check out our online documentation for" " next steps: #{DOCSURL.cyan}" if @skipped_bundle logger . info "Bundle install skipped." . yellow logger . info "You will need to run #{"bundle binstub bridgetown-core".cyan} manually." end logger . info "Yarn install skipped." . yellow if @skipped_yarn end
After a new site has been created, print a success notification and
then automatically execute bundle install from within the new site dir
unless the user opts to skip 'bundle install'.
After a new site has been created print a success notification and then automatically execute bundle install from within the new site dir unless the user opts to skip ' bundle install ' .
# is set to false if bundle install worked
path
<not_specific>
cli_path
<not_specific>
options
<not_specific>