Module: Romo::Dassets

Defined in:
lib/romo/dassets.rb

Class Method Summary collapse

Class Method Details

.configure!Object

TODO: this is a prototype - I’m not even sure how this API will shake out. eventually would have a gem, “romo-dassets”, do this or something



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/romo/dassets.rb', line 11

def self.configure!
  return if @configured

  Dassets.configure do |c|
    c.source Romo.gem_assets_path do |s|
      s.filter{ |paths| paths.reject{ |p| File.basename(p) =~ /^_/ } }

      s.engine 'scss', Dassets::Sass::Engine, {
        :syntax       => 'scss',
        :output_style => 'compressed' # TODO: let them override output style
      }
    end

    c.combination "css/romo.css", [
      'css/romo/normalize.css',
      'css/romo/base.css',
      'css/romo/colors.css',
      'css/romo/forms.css',
      'css/romo/buttons.css',
      'css/romo/labels.css',
      'css/romo/tabs.css',
      'css/romo/lists.css',
      'css/romo/grid.css',
      'css/romo/table.css',
      'css/romo/grid_table.css',
      'css/romo/dropdown.css',
      'css/romo/modal.css',
      'css/romo/indicator_text_input.css',
      'css/romo/select.css',
      'css/romo/picker.css',
      'css/romo/color_select.css',
      'css/romo/datepicker.css',
      'css/romo/tooltip.css',
      'css/romo/sortable.css',
      'css/romo/z_index.css',
    ]
    c.combination "js/romo.js", [
      'js/romo/base.js',
      'js/romo/date.js',
      'js/romo/currency.js',
      'js/romo/word_boundary_filter.js',
      'js/romo/ajax.js',
      'js/romo/onkey.js',
      'js/romo/spinner.js',
      'js/romo/form.js',
      'js/romo/dropdown.js',
      'js/romo/dropdown_form.js',
      'js/romo/indicator_text_input.js',
      'js/romo/currency_text_input.js',
      'js/romo/selected_options_list.js',
      'js/romo/option_list_dropdown.js',
      'js/romo/select_dropdown.js',
      'js/romo/select.js',
      'js/romo/picker.js',
      'js/romo/color_select.js',
      'js/romo/datepicker.js',
      'js/romo/inline.js',
      'js/romo/inline_form.js',
      'js/romo/modal.js',
      'js/romo/modal_form.js',
      'js/romo/tooltip.js',
      'js/romo/sortable.js'
    ]
  end

  @configured = true
end

.reset!Object



79
# File 'lib/romo/dassets.rb', line 79

def self.reset!; @configured = false; end