Sha256: 8d2904c2fc451d680dc834837f3f85addca8084cd2bf898c3e89498af0e5af99

Contents?: true

Size: 326 Bytes

Versions: 13

Compression:

Stored size: 326 Bytes

Contents

# frozen_string_literal: true

module Phlex::Generators
	class ComponentGenerator < ::Rails::Generators::NamedBase
		source_root File.expand_path("templates", __dir__)

		def create_view
			@path = File.join("app/views/components", class_path, "#{file_name}_component.rb")
			template "component.rb.erb", @path
		end
	end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
phlex-rails-1.2.2 lib/generators/phlex/component/component_generator.rb
phlex-rails-1.2.1 lib/generators/phlex/component/component_generator.rb
phlex-rails-1.2.0 lib/generators/phlex/component/component_generator.rb
phlex-rails-1.1.2 lib/generators/phlex/component/component_generator.rb
phlex-rails-1.1.1 lib/generators/phlex/component/component_generator.rb
phlex-rails-1.1.0 lib/generators/phlex/component/component_generator.rb
phlex-rails-1.0.0 lib/generators/phlex/component/component_generator.rb
phlex-rails-0.10.0 lib/generators/phlex/component/component_generator.rb
phlex-rails-0.8.1 lib/generators/phlex/component/component_generator.rb
phlex-rails-0.9.0 lib/generators/phlex/component/component_generator.rb
phlex-rails-0.8.0 lib/generators/phlex/component/component_generator.rb
phlex-rails-0.7.1 lib/generators/phlex/component/component_generator.rb
phlex-rails-0.7.0 lib/generators/phlex/component/component_generator.rb