Skip to content

Commit

Permalink
Merge pull request #289 from solidusio/change/default-frontend
Browse files Browse the repository at this point in the history
Change default frontend
  • Loading branch information
kennyadsl authored Jul 7, 2023
2 parents fef4069 + f021541 commit 1d71b80
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion bin/sandbox
Original file line number Diff line number Diff line change
Expand Up @@ -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!"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 1d71b80

Please sign in to comment.