Sha256: 8b48c9b88018d002b73d87aedba01e6715c3d1ba54103b1614a7027c0f567775

Contents?: true

Size: 772 Bytes

Versions: 21

Compression:

Stored size: 772 Bytes

Contents

require "rails/generators"
require_relative "generator_helper"

module ReactOnRails
  module Generators
    class ReactNoReduxGenerator < Rails::Generators::Base
      include GeneratorHelper
      Rails::Generators.hide_namespace(namespace)
      source_root(File.expand_path("../templates", __FILE__))

      def copy_base_files
        base_path = "no_redux/base/"
        file = "client/app/bundles/HelloWorld/containers/HelloWorld.jsx"
        copy_file(base_path + file, file)
      end

      def template_appropriate_version_of_hello_world_app
        filename = "HelloWorldApp.jsx"
        location = "client/app/bundles/HelloWorld/startup"
        template("no_redux/base/#{location}/HelloWorldApp.jsx.tt", "#{location}/#{filename}")
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
react_on_rails-6.1.2 lib/generators/react_on_rails/react_no_redux_generator.rb
react_on_rails-6.1.1 lib/generators/react_on_rails/react_no_redux_generator.rb
react_on_rails-6.1.1.rc.1 lib/generators/react_on_rails/react_no_redux_generator.rb
react_on_rails-6.1.0 lib/generators/react_on_rails/react_no_redux_generator.rb
react_on_rails-6.0.5 lib/generators/react_on_rails/react_no_redux_generator.rb
react_on_rails-6.0.4 lib/generators/react_on_rails/react_no_redux_generator.rb
react_on_rails-6.0.3 lib/generators/react_on_rails/react_no_redux_generator.rb
react_on_rails-6.0.2 lib/generators/react_on_rails/react_no_redux_generator.rb
react_on_rails-6.0.1 lib/generators/react_on_rails/react_no_redux_generator.rb
react_on_rails-6.0.0 lib/generators/react_on_rails/react_no_redux_generator.rb
react_on_rails-6.0.0.rc.6 lib/generators/react_on_rails/react_no_redux_generator.rb
react_on_rails-6.0.0.rc.5 lib/generators/react_on_rails/react_no_redux_generator.rb
react_on_rails-6.0.0.rc.4 lib/generators/react_on_rails/react_no_redux_generator.rb
react_on_rails-6.0.0.rc3 lib/generators/react_on_rails/react_no_redux_generator.rb
react_on_rails-6.0.0.rc.2 lib/generators/react_on_rails/react_no_redux_generator.rb
react_on_rails-6.0.0.rc.1 lib/generators/react_on_rails/react_no_redux_generator.rb
react_on_rails-6.0.0.beta.5 lib/generators/react_on_rails/react_no_redux_generator.rb
react_on_rails-6.0.0.beta.4 lib/generators/react_on_rails/react_no_redux_generator.rb
react_on_rails-6.0.0.beta.3 lib/generators/react_on_rails/react_no_redux_generator.rb
react_on_rails-6.0.0.beta.2 lib/generators/react_on_rails/react_no_redux_generator.rb