lib/hyla/commands/generate.rb in hyla-1.0.7.pre.1 vs lib/hyla/commands/generate.rb in hyla-1.0.7.pre.2
- old
+ new
@@ -222,18 +222,18 @@
path_to_adoc_file = Pathname.new(f)
relative_path = path_to_adoc_file.relative_path_from(path_to_source).to_s
Hyla.logger.debug ">> Relative path: #{relative_path}"
adoc_file_paths << relative_path
- # Get asciidoc file name
+ # Get asciidoctor file name
file_name_processed = path_to_adoc_file.basename
#
# Create destination dir relative to the path calculated
#
- html_dir = @destination + '/' + File.dirname(relative_path)
- Hyla.logger.info ">> Dir of html: #{html_dir}"
+ html_dir = [@destination, File.dirname(relative_path)] * '/'
+ Hyla.logger.debug ">> Dir of html: #{html_dir}"
FileUtils.mkdir_p html_dir
# Copy Fonts
# TODO : Verify if we still need to do that as the FONTS liberation have been moved
# TODO : under local lib directory of revealjs
@@ -297,12 +297,14 @@
end
#
# Copy resources to target dir
def self.cp_resources_to_dir(path, resource)
- source = [Configuration::resources, resource] * '/'
- destination = [path, resource] * '/'
- FileUtils.cp_r source, destination
+ source = [Configuration::assets, resource] * '/'
+ # destination = [path, resource] * '/'
+ destination = path
+ Hyla.logger.debug ">> Copy resource from Source dir: #{source} --> destination dir: #{destination}"
+ FileUtils.cp_r source, destination, :verbose => false
end
#
# Method parsing TOC File to generate directories and files
# Each Level 1 entry will become a directory