mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	Added node_modules/ to generated files.
This commit is contained in:
		
				
					committed by
					
						 Frans Krojegård
						Frans Krojegård
					
				
			
			
				
	
			
			
			
						parent
						
							6ae6882e1a
						
					
				
				
					commit
					562ec13696
				
			| @@ -59,7 +59,8 @@ module Linguist | |||||||
|         generated_net_docfile? || |         generated_net_docfile? || | ||||||
|         generated_net_designer_file? || |         generated_net_designer_file? || | ||||||
|         generated_protocol_buffer? || |         generated_protocol_buffer? || | ||||||
|         generated_jni_header? |         generated_jni_header? || | ||||||
|  |         node_modules? | ||||||
|     end |     end | ||||||
|  |  | ||||||
|     # Internal: Is the blob an XCode project file? |     # Internal: Is the blob an XCode project file? | ||||||
| @@ -193,5 +194,13 @@ module Linguist | |||||||
|       return lines[0].include?("/* DO NOT EDIT THIS FILE - it is machine generated */") |       return lines[0].include?("/* DO NOT EDIT THIS FILE - it is machine generated */") | ||||||
|       return lines[1].include?("#include <jni.h>") |       return lines[1].include?("#include <jni.h>") | ||||||
|     end |     end | ||||||
|  |  | ||||||
|  |     # node_modules/ can contain large amounts of files, in general not meant | ||||||
|  |     # for humans in pull requests. | ||||||
|  |     # | ||||||
|  |     # Returns true or false. | ||||||
|  |     def node_modules? | ||||||
|  |       !!name.match(/node_modules\//) | ||||||
|  |     end | ||||||
|   end |   end | ||||||
| end | end | ||||||
|   | |||||||
| @@ -204,6 +204,8 @@ class TestBlob < Test::Unit::TestCase | |||||||
|     # Minified CSS |     # Minified CSS | ||||||
|     assert !blob("CSS/bootstrap.css").generated? |     assert !blob("CSS/bootstrap.css").generated? | ||||||
|     assert blob("CSS/bootstrap.min.css").generated? |     assert blob("CSS/bootstrap.min.css").generated? | ||||||
|  |  | ||||||
|  |     assert Linguist::Generated.generated?("node_modules/grunt/lib/grunt.js", nil) | ||||||
|   end |   end | ||||||
|  |  | ||||||
|   def test_vendored |   def test_vendored | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user