Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: 0.5.0
Fetching contributors…

Cannot retrieve contributors at this time

38 lines (33 sloc) 0.986 kb
require "rake-pipeline-web-filters"
require "json"
# require "uglifier"
class PathologyDocumentFilter < Rake::Pipeline::Filter
# NOW WE HAVE TWO PROBLEMS
# this splits methods/documentation into two groups
# we'll flip the order four the output
DOC_FILTER = /((?:[ ]+#.+doc[ =].+\n)(?:[ ]+#.*\n)+)/
def generate_output(inputs, output)
inputs.each do |input|
result = File.read(input.fullpath)
result.gsub!(DOC_FILTER) do |match|
$1.gsub!(/[ ]+(#)/) {|match| " " * (match.length - 2) }
end
output.write result
end
end
end
output "docs"
input "./src" do
match "**/*.coffee" do
filter PathologyDocumentFilter
filter Rake::Pipeline::Web::Filters::CoffeeScriptFilter
minispade rewrite_requires: true, string: true, module_id_generator: proc { |input|
id = input.path.dup
id.sub!('/lib/', '/')
id.sub!(/\.js$/, '')
id.sub!(/\/main$/, '')
id
}
concat "AlphaSimprini-docs.js"
end
end
Jump to Line
Something went wrong with that request. Please try again.