lib/depo/dijit_conventions.rb in depo-0.0.3 vs lib/depo/dijit_conventions.rb in depo-0.0.4

- old
+ new

@@ -20,11 +20,11 @@ parts = @dijit_full_name.split('.') cmps ={:base_module=>parts[0],:class_name=>parts[-1]} if parts.length > 2 cmps[:modules] = parts[1..-2] end - cmps[:dijit_full_name]=dijit_full_name + cmps[:dijit_full_name]=dijit_full_name @cmp_hash=cmps @cmp = OpenStruct.new(cmps) end prop :dijit_full_name do @@ -53,51 +53,47 @@ def from_src(*args) File.join(*args.flatten.unshift(Depo.config.src_path)) end - def from_websrc(*args) - File.join(*args.flatten.unshift(Depo.config.src_webpath)) - end - def j(*args) File.join(*args) end - + prop :package_path do from_src cmp.base_module, cmp.modules end prop :style_dir_path do from_src cmp.base_module,'themes', Depo.config.default_theme, cmp.modules end - prop :style_dir_webpath do - from_websrc cmp.base_module,'themes', Depo.config.default_theme, cmp.modules - end - prop :test_dir_path do from_src cmp.base_module,'tests', cmp.modules end prop :class_path do j(package_path,"#{cmp.class_name}.js") end - prop :style_webpath do - j(style_dir_webpath, "#{cmp.class_name}.css") - end - prop :style_path do j(style_dir_path,"#{cmp.class_name}.css") end prop :test_code_path do j(test_dir_path,"#{cmp.class_name}.js") end prop :test_page_path do j(test_dir_path,"#{cmp.class_name}.html") + end + + prop :template_dir_path do + j(package_path,'templates') + end + + prop :template_path do + j(template_dir_path, "#{cmp.class_name}.html") end prop :dijit_style_class_name do @dijit_full_name.split('.').map{|c| c.capitalize}.join('') end