mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	download-grammars -> convert-grammars
Downloading is only a small part of what this script does. The main thing it does is convert grammars to JSON.
This commit is contained in:
		| @@ -23,7 +23,7 @@ Great! You'll need to: | |||||||
| 0. Add an entry for your language to [`languages.yml`][languages]. | 0. Add an entry for your language to [`languages.yml`][languages]. | ||||||
| 0. Add a grammar for your language. Please only add grammars that have a license that permits redistribution. | 0. Add a grammar for your language. Please only add grammars that have a license that permits redistribution. | ||||||
|     0. Add your grammar as a submodule: `git submodule add https://github.com/JaneSmith/MyGrammar vendor/grammars/MyGrammar`. |     0. Add your grammar as a submodule: `git submodule add https://github.com/JaneSmith/MyGrammar vendor/grammars/MyGrammar`. | ||||||
|     0. Add your grammar to [`grammars.yml`][grammars] by running `script/download-grammars --add vendor/grammars/MyGrammar`. |     0. Add your grammar to [`grammars.yml`][grammars] by running `script/convert-grammars --add vendor/grammars/MyGrammar`. | ||||||
| 0. Add samples for your language to the [samples directory][samples]. | 0. Add samples for your language to the [samples directory][samples]. | ||||||
|  |  | ||||||
| In addition, if your new language defines an extension that's already listed in [`languages.yml`][languages] (such as `.foo`) then sometimes a few more steps will need to be taken: | In addition, if your new language defines an extension that's already listed in [`languages.yml`][languages] (such as `.foo`) then sometimes a few more steps will need to be taken: | ||||||
|   | |||||||
							
								
								
									
										2
									
								
								Rakefile
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								Rakefile
									
									
									
									
									
								
							| @@ -48,7 +48,7 @@ end | |||||||
|  |  | ||||||
| task :build_grammars_gem do | task :build_grammars_gem do | ||||||
|   rm_rf "grammars" |   rm_rf "grammars" | ||||||
|   sh "script/download-grammars" |   sh "script/convert-grammars" | ||||||
|   sh "gem", "build", "github-linguist-grammars.gemspec" |   sh "gem", "build", "github-linguist-grammars.gemspec" | ||||||
| end | end | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user