Class: Yuzu::Command::Preview

Inherits:
PublicationCommand show all
Defined in:
lib/yuzu/commands/preview.rb

Overview

Preview enables a publication endpoint that always publishes to the local filesystem such as a web server folder.

Constant Summary

Constants included from Uploader

Uploader::ENDC, Uploader::GREEN

Instance Attribute Summary

Attributes inherited from Base

#args

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from PublicationCommand

#all, #assets, #changed, #css, #images, #index, #resources, #text

Methods inherited from Base

#initialize, requires_config?, shell, #updater, #uploader, #uploader_config

Constructor Details

This class inherits a constructor from Yuzu::Command::Base

Class Method Details

.help(method) ⇒ Object



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
# File 'lib/yuzu/commands/preview.rb', line 18

def self.help(method)
  case method
  when :index
%Q{Updates files in the preview folder.

preview                           # Alias for preview:all below.
preview [filenames]               # Update the preview with the files listed.
preview:all                       # Update all the files in the preview.
preview:text                      # Only update the processable content files.
preview:css                       # Regenerates the css files and copies them
                                to the preview.
preview:images                    # Copy all the images into the preview folder.
preview:images [files]            # Copy the images listed into the preview folder.
preview:resources                 # Copy all the resources, like CSS and JS
                                files, into the preview folder.
preview:assets                    # Copy all images and other assets (like PDFs and
                                other downloadables) into the preview folder.
}

  when :all
    "Updates all files in the preview folder."

  when :resources
    "Copy all the resources, like CSS and JS files, into the preview folder."

  when :images
    "Copy all images into the preview folder."

  when :assets
    %Q{Copy all images and other assets, usually PDF files and other archives, 
into the preview folder.}

  else
    "No help available for #{method}."

  end
end

.service_overrideObject



14
15
16
# File 'lib/yuzu/commands/preview.rb', line 14

def self.service_override
  "preview"
end

Instance Method Details

#helpObject



11
12
# File 'lib/yuzu/commands/preview.rb', line 11

def help
end

#usageObject



8
9
# File 'lib/yuzu/commands/preview.rb', line 8

def usage
end