Class: Vue::Generators::ComponentGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Vue::Generators::ComponentGenerator
- Defined in:
- lib/generators/vue/component_generator.rb
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/generators/vue/component_generator.rb', line 45 def call component_file_path = File.join( component_target_dir, "#{component_name}.vue" ) template("component.vue", component_file_path) if [:pack] pack_file_path = File.join( pack_target_dir, "#{file_name.dasherize}.js" ) template("pack.js", pack_file_path) end end |