diff --git a/README.md b/README.md index de8e31294a..e625d35d05 100644 --- a/README.md +++ b/README.md @@ -307,12 +307,17 @@ data already loaded. bin/sandbox ``` -* Start the server (`bin/rails` will forward any argument to the sandbox) +* You can start the Rails server and other services from either the Solidus folder or the +sandbox one by running the command: ```bash - bin/rails server + bin/dev ``` +Please note: if you run `bin/rails server` or similar commands, only the Rails server will +start. This might cause the error `couldn't find file 'solidus_admin/tailwind.css'` when you +try to load admin pages. + ### Tests Solidus uses [RSpec](http://rspec.info) for tests. Refer to its documentation for diff --git a/core/lib/generators/solidus/install/install_generator.rb b/core/lib/generators/solidus/install/install_generator.rb index 44794d4b35..4bf4eb8433 100644 --- a/core/lib/generators/solidus/install/install_generator.rb +++ b/core/lib/generators/solidus/install/install_generator.rb @@ -35,6 +35,7 @@ class InstallGenerator < Rails::Generators::AppBase class_option :sample, type: :boolean, default: true, banner: 'Load sample data (migrations and seeds must be run)' class_option :active_storage, type: :boolean, default: true, banner: 'Install ActiveStorage as image attachments handler for products and taxons' class_option :admin_preview, type: :boolean, default: true, desc: 'Install the admin preview' + class_option :build_admin_tailwind, type: :boolean, default: true, desc: 'Build and install Solidus Admin Tailwind CSS file and rake tasks' class_option :auto_accept, type: :boolean class_option :user_class, type: :string class_option :admin_email, type: :string @@ -175,6 +176,12 @@ def run_migrations end end + def install_subcomponents + apply_template_for :authentication, @selected_authentication + apply_template_for :frontend, @selected_frontend + apply_template_for :payment_method, @selected_payment_method + end + def install_solidus_admin return unless options[:admin_preview] @@ -182,13 +189,7 @@ def install_solidus_admin unless File.read(app_path.join('Gemfile')).include?('solidus_admin') bundle_command 'add solidus_admin -v ">= 0.2"' end - generate 'solidus_admin:install' - end - - def install_subcomponents - apply_template_for :authentication, @selected_authentication - apply_template_for :frontend, @selected_frontend - apply_template_for :payment_method, @selected_payment_method + generate "solidus_admin:install #{'--tailwind' if options[:build_admin_tailwind]}" end def populate_seed_data