mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
22 lines
476 B
Ruby
22 lines
476 B
Ruby
require 'rake/clean'
|
|
require 'rake/testtask'
|
|
|
|
task :default => :test
|
|
|
|
Rake::TestTask.new do |t|
|
|
t.warning = true
|
|
end
|
|
|
|
CLOBBER.include 'lib/linguist/lexers.yml'
|
|
|
|
file 'lib/linguist/lexers.yml' do |f|
|
|
# GitHub vendored pygments path
|
|
# vendor/python/pygments
|
|
path = File.expand_path('../../../python/pygments', __FILE__)
|
|
ENV['PYTHONPATH'] = path if File.directory?(path)
|
|
|
|
sh "python ./bin/pygments-lexers > #{f.name}"
|
|
end
|
|
|
|
task :lexers => 'lib/linguist/lexers.yml'
|