Sha256: c0afc3222445c65c106d80eb6d698a98fec78a290757713dff780aa2e40d0610
Contents?: true
Size: 910 Bytes
Versions: 13
Compression:
Stored size: 910 Bytes
Contents
module DiscoApp module Generators class ReactifyGenerator < Rails::Generators::Base source_root File.expand_path('../templates', __FILE__) # Install the react-rails gem and run its setup. def install_gem # Add gem to Gemfile gem 'react-rails', '~> 1.1.0' # Install gem. Bundler.with_clean_env do run 'bundle install' end # Run the gem's generator. generate 'react:install' end # Set application configuration def configure_application application "config.react.variant = :development", env: :development application "# Use development variant of React in development.", env: :development application "config.react.variant = :production", env: :production application "# Use production variant of React in production.", env: :production end end end end
Version data entries
13 entries across 13 versions & 1 rubygems