Module: Arethusa::CLI::Helpers::DirectoriesAndFiles
- Defined in:
- lib/arethusa/cli/helpers/directories_and_files.rb
Instance Method Summary collapse
- #conf_dir(file = '') ⇒ Object
- #create_bower ⇒ Object
- #create_conf_file ⇒ Object
- #create_gitignore ⇒ Object
- #create_gruntfile ⇒ Object
- #create_html_template ⇒ Object
- #create_index_file ⇒ Object
- #create_jshintrc ⇒ Object
- #create_module ⇒ Object
- #create_package ⇒ Object
- #create_retriever ⇒ Object
- #create_retriever_spec ⇒ Object
- #create_scss ⇒ Object
- #create_service ⇒ Object
- #create_spec ⇒ Object
- #css_dir(file = '') ⇒ Object
- #dist_dir(file = '') ⇒ Object
- #html_template_file ⇒ Object
- #js_dir(file = '') ⇒ Object
- #plugin_dir(file = '') ⇒ Object
- #spec_dir(file = '') ⇒ Object
- #temp_dir ⇒ Object
- #template_dir(file = '') ⇒ Object
- #template_path(name) ⇒ Object
Instance Method Details
#conf_dir(file = '') ⇒ Object
36 37 38 |
# File 'lib/arethusa/cli/helpers/directories_and_files.rb', line 36 def conf_dir(file = '') File.join(destination_root, 'app/static', 'configs', file) end |
#create_bower ⇒ Object
72 73 74 |
# File 'lib/arethusa/cli/helpers/directories_and_files.rb', line 72 def create_bower template(template_path('bower'), 'bower.json') end |
#create_conf_file ⇒ Object
88 89 90 |
# File 'lib/arethusa/cli/helpers/directories_and_files.rb', line 88 def create_conf_file template(template_path('conf'), conf_dir('staging.json')) end |
#create_gitignore ⇒ Object
60 61 62 |
# File 'lib/arethusa/cli/helpers/directories_and_files.rb', line 60 def create_gitignore template(template_path('gitignore'), '.gitignore') end |
#create_gruntfile ⇒ Object
76 77 78 |
# File 'lib/arethusa/cli/helpers/directories_and_files.rb', line 76 def create_gruntfile template(template_path('gruntfile'), 'Gruntfile.js') end |
#create_html_template ⇒ Object
52 53 54 |
# File 'lib/arethusa/cli/helpers/directories_and_files.rb', line 52 def create_html_template template(template_path('html_template'), html_template_file) end |
#create_index_file ⇒ Object
84 85 86 |
# File 'lib/arethusa/cli/helpers/directories_and_files.rb', line 84 def create_index_file template(template_path('index'), "app/index.html") end |
#create_jshintrc ⇒ Object
64 65 66 |
# File 'lib/arethusa/cli/helpers/directories_and_files.rb', line 64 def create_jshintrc template(template_path('jshintrc'), '.jshintrc') end |
#create_module ⇒ Object
44 45 46 |
# File 'lib/arethusa/cli/helpers/directories_and_files.rb', line 44 def create_module template(template_path('module'), js_dir("#{namespaced_name}.js")) end |
#create_package ⇒ Object
68 69 70 |
# File 'lib/arethusa/cli/helpers/directories_and_files.rb', line 68 def create_package template(template_path('package'), 'package.json') end |
#create_retriever ⇒ Object
92 93 94 |
# File 'lib/arethusa/cli/helpers/directories_and_files.rb', line 92 def create_retriever template(template_path('retriever'), js_dir(File.join(mod, "#{name}.js"))) end |
#create_retriever_spec ⇒ Object
96 97 98 |
# File 'lib/arethusa/cli/helpers/directories_and_files.rb', line 96 def create_retriever_spec template(template_path('retriever_spec'), spec_dir("#{name}_spec.js")) end |
#create_scss ⇒ Object
80 81 82 |
# File 'lib/arethusa/cli/helpers/directories_and_files.rb', line 80 def create_scss template(template_path('scss'), css_dir("#{namespaced_name}.scss")) end |
#create_service ⇒ Object
48 49 50 |
# File 'lib/arethusa/cli/helpers/directories_and_files.rb', line 48 def create_service template(template_path('service'), plugin_dir("#{name}.js")) end |
#create_spec ⇒ Object
56 57 58 |
# File 'lib/arethusa/cli/helpers/directories_and_files.rb', line 56 def create_spec template(template_path('plugin_spec'), spec_dir("#{name}_spec.js")) end |
#css_dir(file = '') ⇒ Object
32 33 34 |
# File 'lib/arethusa/cli/helpers/directories_and_files.rb', line 32 def css_dir(file = '') File.join(destination_root, 'app/css', file) end |
#dist_dir(file = '') ⇒ Object
40 41 42 |
# File 'lib/arethusa/cli/helpers/directories_and_files.rb', line 40 def dist_dir(file = '') File.join(destination_root, 'dist', file) end |
#html_template_file ⇒ Object
16 17 18 |
# File 'lib/arethusa/cli/helpers/directories_and_files.rb', line 16 def html_template_file template_dir("#{name}.html") end |
#js_dir(file = '') ⇒ Object
20 21 22 |
# File 'lib/arethusa/cli/helpers/directories_and_files.rb', line 20 def js_dir(file = '') File.join(destination_root, 'app/js', file) end |
#plugin_dir(file = '') ⇒ Object
8 9 10 |
# File 'lib/arethusa/cli/helpers/directories_and_files.rb', line 8 def plugin_dir(file = '') File.join(js_dir, namespaced_name, file) end |
#spec_dir(file = '') ⇒ Object
28 29 30 |
# File 'lib/arethusa/cli/helpers/directories_and_files.rb', line 28 def spec_dir(file = '') File.join(destination_root, 'spec', mod || namespaced_name, file) end |
#temp_dir ⇒ Object
24 25 26 |
# File 'lib/arethusa/cli/helpers/directories_and_files.rb', line 24 def temp_dir File.join(destination_root, 'app/templates') end |
#template_dir(file = '') ⇒ Object
12 13 14 |
# File 'lib/arethusa/cli/helpers/directories_and_files.rb', line 12 def template_dir(file = '') File.join(temp_dir, namespaced_name, file) end |
#template_path(name) ⇒ Object
4 5 6 |
# File 'lib/arethusa/cli/helpers/directories_and_files.rb', line 4 def template_path(name) File.join(File.('../../templates/', __FILE__), name) end |