Class: Angular::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Angular::Generators::InstallGenerator
show all
- Includes:
- ResourceHelpers
- Defined in:
- lib/generators/angular/install/install_generator.rb
Instance Method Summary
collapse
#angular_path, #angular_spec_path, #angular_templates_path, #application_name, #assets_path
Instance Method Details
#create_angular_javascript_dir_layout ⇒ Object
21
22
23
24
25
26
|
# File 'lib/generators/angular/install/install_generator.rb', line 21
def create_angular_javascript_dir_layout
%W{controllers filters services widgets}.each do |dir|
empty_directory "#{angular_path}/#{dir}"
create_file "#{angular_path}/#{dir}/.gitkeep" unless options[:skip_git]
end
end
|
#create_spec_dir_layout ⇒ Object
33
34
35
36
|
# File 'lib/generators/angular/install/install_generator.rb', line 33
def create_spec_dir_layout
empty_directory angular_spec_path
create_file "#{angular_spec_path}/.gitkeep" unless options[:skip_git]
end
|
#create_templates_dir_layout ⇒ Object
28
29
30
31
|
# File 'lib/generators/angular/install/install_generator.rb', line 28
def create_templates_dir_layout
empty_directory angular_templates_path
create_file "#{angular_templates_path}/.gitkeep" unless options[:skip_git]
end
|
#inject_angular ⇒ Object
15
16
17
18
19
|
# File 'lib/generators/angular/install/install_generator.rb', line 15
def inject_angular
append_to_file "app/assets/javascripts/application.js" do
"//= require angular.min\n//= require angle-up\n//= require_tree ./angular\n"
end
end
|