Skip to content

Commit c2b4db4

Browse files
mamhofftvdeyen
authored andcommitted
Generate Manifest file early in sandbox generation
The sandbox wants to install Solidus and migrate before running the install generator. That's bad, because migrating requires the app to boot, and booting fails because Sprockets fails with an error if the `manifest.js` file is not present. Since the file is quite simple, we can just pass it into a heredoc. This is needed for Rails 8, where the install generator won't create the file for us.
1 parent f783ea3 commit c2b4db4

File tree

1 file changed

+8
-0
lines changed
  • lib/solidus_dev_support/templates/extension/bin

1 file changed

+8
-0
lines changed

lib/solidus_dev_support/templates/extension/bin/sandbox.tt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,14 @@ group :test, :development do
6161
end
6262
RUBY
6363

64+
echo "Generating manifest file"
65+
mkdir -p app/assets/config
66+
cat <<MANIFESTJS > app/assets/config/manifest.js
67+
//= link_tree ../images
68+
//= link_directory ../javascripts .js
69+
//= link_directory ../stylesheets .css
70+
MANIFESTJS
71+
6472
unbundled bundle install --gemfile Gemfile
6573

6674
unbundled bundle exec rake db:drop db:create

0 commit comments

Comments
 (0)