Class: Bonsai::Exporter
- Inherits:
-
Object
- Object
- Bonsai::Exporter
- Defined in:
- lib/bonsai/exporter.rb
Class Attribute Summary collapse
-
.path ⇒ Object
Returns the value of attribute path.
Class Method Summary collapse
Class Attribute Details
.path ⇒ Object
Returns the value of attribute path.
8 9 10 |
# File 'lib/bonsai/exporter.rb', line 8 def path @path end |
Class Method Details
.compress_assets ⇒ Object
39 40 41 42 43 |
# File 'lib/bonsai/exporter.rb', line 39 def compress_assets Bonsai.log "Compressing javascript and stylesheets" compress_asset_path("#{path}/**/*.js", YUI::JavaScriptCompressor.new) compress_asset_path("#{path}/**/*.css", YUI::CssCompressor.new) end |
.copy_public ⇒ Object
31 32 33 34 35 36 37 |
# File 'lib/bonsai/exporter.rb', line 31 def copy_public generate_css Bonsai.log "Copying public files" # Using system call because fileutils is inadequate system("cp -fR '#{Bonsai.root_dir}/public/.' '#{path}/.'") end |
.process! ⇒ Object
11 12 13 14 15 16 |
# File 'lib/bonsai/exporter.rb', line 11 def process! setup copy_public copy_assets cleanup end |
.publish! ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/bonsai/exporter.rb', line 18 def publish! teardown setup copy_assets copy_public compress_assets write_index write_pages write_sitemap write_readme cleanup end |