2011-11-26 1 views
0

je fonctionne pas correctement la tâche suivanterakefile.rb ne

task :default => ['build_html'] 

desc 'Generar documentacion desde markdown' 
task :build_html do 
    SRC = FileList['*.md'] 

    directory 'html' 

    SRC.each do |md| 
     html = md.sub(/\.[^.]*$/, '.html') 
     file html do 
      sh "markdown #{md} > html/#{html}" 
     end 
    end 
end 

Il est censé ne fonctionne pas correctement, pour trouver tous les fichiers .MD, pour chaque extrait de fichier que le nom, append et .html enfin exécuter markdown file.md > html/file.html.

Mais cela ne fonctionne pas. Il ne crée même pas le répertoire 'html'.

j'ai installé ruby-1.9.2 avec rvm

Répondre

0

Enfin j'étais fatigué et je résolus comme suit

task :default => ['build_html'] 
desc 'Generar documentacion desde markdown' 
task :build_html do 
    SRC = FileList['*.md'] 
    SRC.each do |md| 
     html = md.sub(/\.[^.]*$/, ".html") 
     sh "markdown #{md} > html/#{html}" 
    end 
end 
Questions connexes