lib/rimless/tasks/generator.rake
# Install a template file to the project.
#
# @param src [String] the template source file name
# @param dest [Array<String>] the relative destination parts
Install a template file to the project.
Install a template file to the project .
def install_template(src, *dest)
    src = File.join(__dir__, 'templates', src)
    dest = File.join(Dir.pwd, *dest, File.basename(src))
    return puts "#    [Skip] #{dest}" if File.exist? dest
    puts "# [Install] #{dest}"
    FileUtils.mkdir_p(File.dirname(dest))
    FileUtils.copy(src, dest)
  end
def install_template ( src , * dest ) src = File . join ( __dir__ , 'templates' , src ) dest = File . join ( Dir . pwd , * dest , File . basename ( src ) ) return puts "#    [Skip] #{dest}" if File . exist? dest puts "# [Install] #{dest}" FileUtils . mkdir_p ( File . dirname ( dest ) ) FileUtils . copy ( src , dest ) end
Install a template file to the project.
Install a template file to the project .
src
the template source file name
the template source file name
dest
the relative destination parts
the relative destination parts