Class: Flame::Generators::App

Inherits:
Rails::Generators::AppGenerator
  • Object
show all
Defined in:
lib/flame/generators/app.rb

Instance Method Summary collapse

Instance Method Details

#custom_templateObject



14
15
16
# File 'lib/flame/generators/app.rb', line 14

def custom_template
  build :configure_generators
end

#finish_templateObject



8
9
10
11
12
# File 'lib/flame/generators/app.rb', line 8

def finish_template
  invoke :custom_template
  invoke :generators
  super
end

#generatorsObject



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/flame/generators/app.rb', line 18

def generators
  run("spring stop > /dev/null 2>&1 || true")
  run("bundle install")
  invoke "flame:haml"
  rails_command "db:create"

  invoke "flame:testing"
  invoke "flame:cors"
  invoke "flame:devise"
  invoke "flame:vite"

  generate("annotate:install")
  template ".rubocop.yml", ".rubocop.yml"
  template ".solargraph.yml", ".solargraph.yml"
  run("bundle exec standardrb --fix-unsafely")
  rails_command("db:migrate") if yes?("\nDo you want to run migrations? [y/n]")
  rails_command("db:seed") if yes?("\nDo you want to run seed? [y/n]")
  welcome_message

  exit 0
end