mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
The purpose of this gem is to package up the language grammars that are used for syntax highlighting on github.com. The grammars are TextMate, Sublime Text, or Atom language grammars, converted to JSON and given the filename SCOPE.json, where SCOPE is the language scope that the grammar defines. The github-linguist-grammars gem packages up all the grammars, and also exports a Linguist::Grammars.path method to locate the directory containing the grammars. To build the gem, simply run `rake build_grammars_gem`. The grammars.yml file lists all the repositories we download grammars from, as well as which scopes are defined by each repository. The script/download-grammars script takes that list and downloads and processes the grammars into the format expected by the gem.
15 lines
421 B
Ruby
15 lines
421 B
Ruby
require File.expand_path('../lib/linguist/version', __FILE__)
|
|
|
|
Gem::Specification.new do |s|
|
|
s.name = 'github-linguist-grammars'
|
|
s.version = Linguist::VERSION
|
|
s.summary = "Language grammars for use with github-linguist"
|
|
|
|
s.authors = "GitHub"
|
|
s.homepage = "https://github.com/github/linguist"
|
|
|
|
s.files = ['lib/linguist/grammars.rb'] + Dir['grammars/*']
|
|
|
|
s.add_development_dependency 'plist', '~>3.1'
|
|
end
|