Module: Stylus
- Extended by:
- CoreExt
- Defined in:
- lib/stylus_rails/core_ext.rb,
lib/stylus_rails/runner.rb,
lib/stylus_rails/stylus.rb,
lib/stylus_rails/railtie.rb,
lib/stylus_rails/sinatra.rb,
lib/stylus_rails/version.rb
Overview
Defined Under Namespace
Modules: CoreExt, Sinatra
Classes: Railtie, Runner
Constant Summary
collapse
- Error =
Class.new(StandardError)
- CompilationError =
Class.new(Error)
- VERSION =
"0.1.3"
- @@directory =
"stylus"
- @@root =
Dir.pwd
- @@compile_directory =
nil
- @@extension =
"styl"
- @@compress =
true
- @@silent =
false
Class Method Summary
collapse
Methods included from CoreExt
mattr_accessor
Class Method Details
.compile ⇒ Object
42
43
44
45
|
# File 'lib/stylus_rails/stylus.rb', line 42
def compile
paths = Dir[File.join(folder, "**", "*.#{extension}")]
Stylus::Runner.new(paths).call
end
|
.folder ⇒ Object
57
58
59
|
# File 'lib/stylus_rails/stylus.rb', line 57
def folder
File.join(root, directory)
end
|
.logger ⇒ Object
38
39
40
|
# File 'lib/stylus_rails/stylus.rb', line 38
def logger
@@logger ||= Logger.new($stdout)
end
|
.warning ⇒ Object
47
48
49
50
51
52
53
54
55
|
# File 'lib/stylus_rails/stylus.rb', line 47
def warning
<<-WARN
Warning: The 'stylus' executable was not found on your system.
Check stylus docs about installation at https://github.com/LearnBoost/stylus
and be sure to have node.js and npm properly installed.
WARN
end
|