Skip to content

Commit

Permalink
[#473] Add missing options
Browse files Browse the repository at this point in the history
  • Loading branch information
sanG-github committed Nov 14, 2023
1 parent 46ea2d2 commit bc87a2f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .template/variants/web/template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ def apply_web_variant!
apply '.gitignore.rb'

# Add-ons - [Optional]
apply '.template/addons/bootstrap/template.rb' if yes? install_addon_prompt 'Bootstrap'
apply '.template/addons/slim/template.rb' if yes? install_addon_prompt 'Slim Template Engine'
apply '.template/addons/hotwire/template.rb' if yes? install_addon_prompt 'Hotwire'
apply '.template/addons/svgeez/template.rb' if yes? install_addon_prompt 'Svgeez'
apply '.template/addons/bootstrap/template.rb' if @install_bootstrap
apply '.template/addons/slim/template.rb' if @install_slim
apply '.template/addons/hotwire/template.rb' if @install_hotwire
apply '.template/addons/svgeez/template.rb' if @install_svgeez

after_bundle do
use_source_path __dir__
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
# Y - in response to Would you like to add the Bootstrap addon?
# Y - in response to Would you like to add the Slim Template Engine addon?
# Y - in response to Would you like to add the Hotwire addon?
# Y - in response to Would you like to add the Svgeez addon?

create_web:
printf "Y\nY\nY\nY\nY\nY\nY\nY\nY\nY\n" | rails new $(APP_NAME) -m ./template.rb -T ${OPTIONS}
printf "Y\nY\nY\nY\nY\nY\nY\nY\nY\nY\nY\n" | rails new $(APP_NAME) -m ./template.rb -T ${OPTIONS}

# Y - in response to Would you like to add the Github addon?
# Y - in response to Would you like to add the Mock Server addon?
Expand Down
7 changes: 7 additions & 0 deletions template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@ def ask_for_optional_addons
@install_nginx = true if yes?(install_addon_prompt('Nginx'))
@install_phrase = true if yes?(install_addon_prompt('Phrase'))
@install_devise = true if yes?(install_addon_prompt('Devise'))

return unless WEB_VARIANT

@install_bootstrap = true if yes?(install_addon_prompt('Bootstrap'))
@install_slim = true if yes?(install_addon_prompt('Slim Template Engine'))
@install_hotwire = true if yes?(install_addon_prompt('Hotwire'))
@install_svgeez = true if yes?(install_addon_prompt('Svgeez'))
end

def apply_optional_addons
Expand Down

0 comments on commit bc87a2f

Please sign in to comment.