Sha256: e6da156cca90b6ae9a67f449879f79011730b487e0cb3cebe241d382eddc9199

Contents?: true

Size: 553 Bytes

Versions: 47

Compression:

Stored size: 553 Bytes

Contents

require "rails/generators"

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

      def create_node_directory
        empty_directory("client/node")
      end

      def copy_base_redux_files
        base_path = "node/base/"
        %w(client/node/server.js
           client/node/package.json).each do |file|
             copy_file(base_path + file, file)
           end
      end
    end
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
react_on_rails-8.0.1 lib/generators/react_on_rails/node_generator.rb
react_on_rails-8.0.0 lib/generators/react_on_rails/node_generator.rb
react_on_rails-8.0.0.beta.3 lib/generators/react_on_rails/node_generator.rb
react_on_rails-8.0.0.beta.2 lib/generators/react_on_rails/node_generator.rb
react_on_rails-8.0.0.beta.1 lib/generators/react_on_rails/node_generator.rb
react_on_rails-7.1.0.beta.3 lib/generators/react_on_rails/node_generator.rb
react_on_rails-7.0.4 lib/generators/react_on_rails/node_generator.rb
react_on_rails-7.1.0.beta.2 lib/generators/react_on_rails/node_generator.rb
react_on_rails-7.0.3 lib/generators/react_on_rails/node_generator.rb
react_on_rails-7.1.0.beta.1 lib/generators/react_on_rails/node_generator.rb
react_on_rails-7.0.2 lib/generators/react_on_rails/node_generator.rb
react_on_rails-7.0.1 lib/generators/react_on_rails/node_generator.rb
react_on_rails-7.0.0 lib/generators/react_on_rails/node_generator.rb
react_on_rails-6.10.1 lib/generators/react_on_rails/node_generator.rb
react_on_rails-6.10.0 lib/generators/react_on_rails/node_generator.rb
react_on_rails-6.9.3 lib/generators/react_on_rails/node_generator.rb
react_on_rails-6.9.2 lib/generators/react_on_rails/node_generator.rb
react_on_rails-6.9.1 lib/generators/react_on_rails/node_generator.rb
react_on_rails-6.9.0 lib/generators/react_on_rails/node_generator.rb
react_on_rails-6.8.2 lib/generators/react_on_rails/node_generator.rb