Class: Quilt::ReactSetupGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/quilt/react_setup/react_setup_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_tsconfigObject



22
23
24
# File 'lib/generators/quilt/react_setup/react_setup_generator.rb', line 22

def create_tsconfig
  copy_file("tsconfig.json")
end

#install_js_dependenciesObject



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/generators/quilt/react_setup/react_setup_generator.rb', line 10

def install_js_dependencies
  return if options.skip_yarn?

  say("Installing react and types dependencies")
  system("yarn add "\
    "typescript@~3.8.0 "\
    "react@~16.11.0 "\
    "react-dom@~16.11.0 "\
    "@types/react@~16.9.0 "\
    "@types/react-dom@~16.9.0 ")
end