diff --git a/README.md b/README.md index 156f7c00..7653ed5d 100644 --- a/README.md +++ b/README.md @@ -13,24 +13,27 @@ Add solidus_subscriptions to your Gemfile: gem 'solidus_subscriptions', github: 'solidusio/solidus_subscriptions' ``` +### Starter Frontend + Bundle your dependencies and run the installation generator: ```shell $ bundle -$ bin/rails generate solidus_subscriptions:install --frontend=starter +$ bin/rails generate solidus_subscriptions:install ``` -Please, be aware that the starter installation only works with the default +Please, be aware that the installation only works with the default implementation of the starter frontend. Any customization to the files that will be modified by the installer might break the installation procedure. If that happens, try to adapt the installed code on top of the customizations of the store. +### Legacy Frontend If you are using the legacy `solidus_frontend` gem, please run this command instead: ```shell -$ bin/rails generate solidus_subscriptions:install +$ bin/rails generate solidus_subscriptions:install --frontend=classic ``` ### Guest checkout diff --git a/bin/sandbox b/bin/sandbox index a5f83de9..8c665ac6 100755 --- a/bin/sandbox +++ b/bin/sandbox @@ -71,7 +71,7 @@ unbundled bundle exec rails generate solidus:install \ --payment-method=none \ $@ -unbundled bundle exec rails generate ${extension_name}:install --frontend=starter --auto-run-migrations=true +unbundled bundle exec rails generate ${extension_name}:install --auto-run-migrations=true echo echo "🚀 Sandbox app successfully created for $extension_name!" diff --git a/lib/generators/solidus_subscriptions/install/install_generator.rb b/lib/generators/solidus_subscriptions/install/install_generator.rb index e727e053..e9805d87 100644 --- a/lib/generators/solidus_subscriptions/install/install_generator.rb +++ b/lib/generators/solidus_subscriptions/install/install_generator.rb @@ -6,7 +6,8 @@ class InstallGenerator < Rails::Generators::Base source_root File.expand_path('templates', __dir__) class_option :auto_run_migrations, type: :boolean, default: false - class_option :frontend, type: :string, default: 'classic' + # Either 'starter' or 'classic' + class_option :frontend, type: :string, default: 'starter' def copy_initializer template 'initializer.rb', 'config/initializers/solidus_subscriptions.rb'