Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

42 lines (34 sloc) 0.99 kB
require 'rake/clean'
SRC = FileList['lib/*.coffee']
BUILDDIR = 'dist'
CLEAN.include(BUILDDIR)
directory BUILDDIR
desc "run vows tests and coffeelint"
task :test => [:vows, :coffeelint]
task :default => :test
desc "run coffeelint"
task :coffeelint do
sh "find lib test -name '*.coffee' | xargs node_modules/.bin/coffeelint -f etc/coffeelint.json"
end
desc "run vows tests"
task :vows do
sh "find test -name 'test*.coffee' | xargs node_modules/.bin/vows --spec"
end
fixme_command = "grep -ri --after-context=3 fixme lib test"
desc fixme_command
task :fixme do
sh fixme_command
end
desc "compile to dist dir for npm"
task :build => [:clean, BUILDDIR]
SRC.each do |srccoffee|
compiledjs = File.join(BUILDDIR, File.basename(srccoffee).ext('js'))
task :build => [compiledjs]
file compiledjs => [BUILDDIR, srccoffee] do
sh "node_modules/.bin/coffee -o #{BUILDDIR} -c #{srccoffee}"
end
end
desc "publish to npm"
task :publish do
sh "npm publish"
end
Jump to Line
Something went wrong with that request. Please try again.