Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce suspenders:setup generator #1157

Merged
merged 8 commits into from
Feb 16, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove dev:prime
We'll introduce this in a separate generator.
stevepolitodesign committed Feb 14, 2024
commit b074e46321807765c37e30f0927fb5ffd0a05ea2
4 changes: 0 additions & 4 deletions lib/generators/suspenders/setup_generator.rb
Original file line number Diff line number Diff line change
@@ -10,10 +10,6 @@ class SetupGenerator < Rails::Generators::Base
```
TEXT

def create_dev_prime
copy_file "dev_prime.rb", "lib/tasks/dev.rake"
end

def replace_bin_setup
copy_file "bin_setup.rb", "bin/setup", force: true
end
6 changes: 5 additions & 1 deletion lib/generators/templates/setup/bin_setup.rb
Original file line number Diff line number Diff line change
@@ -20,7 +20,11 @@ def using_node?
system("yarn install --check-files") if using_node?

puts "\n== Preparing database and adding development seed data =="
system! "bin/rails dev:prime"
if File.exist? "lib/tasks/dev.rake"
system! "bin/rails dev:rake"
stevepolitodesign marked this conversation as resolved.
Show resolved Hide resolved
else
system! "bin/rails db:prepare"
end

if Bundler.rubygems.find_name("sprockets")
puts "\n== Generating assets =="