Module: FlatUI
- Defined in:
- app/helpers/flat_ui/rails/icon_helper.rb,
lib/flat-ui-sass.rb,
lib/flat-ui-sass/cli.rb,
lib/flat-ui-sass/engine.rb,
lib/flat-ui-sass/version.rb
Overview
Defined Under Namespace
Modules: Rails
Classes: CLI
Constant Summary
collapse
- VERSION =
'2.1.3'
- PRO_VERSION =
'1.2.5'
Class Method Summary
collapse
Class Method Details
.asset_pipeline? ⇒ Boolean
Environment detection helpers
57
58
59
|
# File 'lib/flat-ui-sass.rb', line 57
def asset_pipeline?
defined?(::Sprockets)
end
|
.assets_path ⇒ Object
52
53
54
|
# File 'lib/flat-ui-sass.rb', line 52
def assets_path
@assets_path ||= File.join base_path, 'vendor', 'assets'
end
|
.base_path ⇒ Object
32
33
34
|
# File 'lib/flat-ui-sass.rb', line 32
def base_path
@base_path ||= pro? ? project_path : gem_path
end
|
.compass? ⇒ Boolean
61
62
63
|
# File 'lib/flat-ui-sass.rb', line 61
def compass?
defined?(::Compass)
end
|
.fonts_path ⇒ Object
40
41
42
|
# File 'lib/flat-ui-sass.rb', line 40
def fonts_path
File.join assets_path, 'fonts'
end
|
.gem_path ⇒ Object
23
24
25
|
# File 'lib/flat-ui-sass.rb', line 23
def gem_path
@gem_path ||= File.expand_path '..', File.dirname(__FILE__)
end
|
.images_path ⇒ Object
48
49
50
|
# File 'lib/flat-ui-sass.rb', line 48
def images_path
File.join assets_path, 'images'
end
|
.javascripts_path ⇒ Object
44
45
46
|
# File 'lib/flat-ui-sass.rb', line 44
def javascripts_path
File.join assets_path, 'javascripts'
end
|
.load! ⇒ Object
9
10
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/flat-ui-sass.rb', line 9
def load!
require 'flat-ui-sass/sass_functions'
register_compass_extension if compass?
if rails?
require 'sass-rails'
register_rails_engine
end
configure_sass
end
|
.pro? ⇒ Boolean
69
70
71
|
# File 'lib/flat-ui-sass.rb', line 69
def pro?
Dir.exists? File.join(project_path, 'vendor/assets/stylesheets/flat-ui-pro')
end
|
.project_path ⇒ Object
This definitely needs a better solution
28
29
30
|
# File 'lib/flat-ui-sass.rb', line 28
def project_path
@project_path ||= Dir.pwd
end
|
.rails? ⇒ Boolean
65
66
67
|
# File 'lib/flat-ui-sass.rb', line 65
def rails?
defined?(::Rails)
end
|
.stylesheets_path ⇒ Object
36
37
38
|
# File 'lib/flat-ui-sass.rb', line 36
def stylesheets_path
File.join assets_path, 'stylesheets'
end
|