Class | Nanoc::Compiler |
In: |
lib/nanoc/base/compilation/compiler.rb
|
Parent: | Object |
Responsible for compiling a site’s item representations.
The compilation process makes use of notifications (see {Nanoc::NotificationCenter}) to track dependencies between items, layouts, etc. The following notifications are used:
site | [R] | @return [Nanoc::Site] The site this compiler belongs to |
stack | [R] |
The compilation stack. When the compiler begins compiling a rep or a
layout, it will be placed on the stack; when it is done compiling the rep
or layout, it will be removed from the stack.
@return [Array] The compilation stack |
Creates a new compiler fo the given site
@param [Nanoc::Site] site The site this compiler belongs to
@param [Nanoc::ItemRep] rep The item representation for which the
assigns should be fetched
@return [Hash] The assigns that should be used in the next filter/layout
operation
@api private
Returns the dependency tracker for this site, creating it first if it does not yet exist.
@api private
@return [Nanoc::DependencyTracker] The dependency tracker for this site
Returns all objects managed by the site (items, layouts, code snippets, site configuration and the rules).
@api private
@return [Nanoc::RulesCollection] The collection of rules to be used
for compiling this site
Compiles the site and writes out the compiled item representations.
Previous versions of nanoc (< 3.2) allowed passing items to compile, and had a “force” option to make the compiler recompile all pages, even when not outdated. These arguments and options are, as of nanoc 3.2, no longer used, and will simply be ignored when passed to {run}.
@overload run
@return [void]