Skip to content

Commit

Permalink
Merge pull request github-linguist#151 from aseemk/streamlinejs-support
Browse files Browse the repository at this point in the history
Add ._js & ._coffee extensions for Streamline.js.
  • Loading branch information
josh committed May 8, 2012
2 parents a9e1f38 + 17adccc commit aa7c849
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/linguist/languages.yml
Expand Up @@ -235,8 +235,9 @@ CoffeeScript:
color: "#244776"
aliases:
- coffee
primary_extension: .coffee
extensions:
- .coffee
- ._coffee
filenames:
- Cakefile

Expand Down Expand Up @@ -644,6 +645,7 @@ JavaScript:
- node
primary_extension: .js
extensions:
- ._js
- .bones
- .jake
- .js
Expand Down
7 changes: 7 additions & 0 deletions test/test_language.rb
Expand Up @@ -254,6 +254,11 @@ def test_find_by_extension
assert_equal Language['PHP'], Language.find_by_extension('php5')
assert_equal Language['PowerShell'], Language.find_by_extension('psm1')
assert_equal Language['PowerShell'], Language.find_by_extension('ps1')

# Aliases for Streamline.js ( https://github.com/Sage/streamlinejs )
assert_equal Language['JavaScript'], Language.find_by_extension('_js')
assert_equal Language['CoffeeScript'], Language.find_by_extension('_coffee')

assert_nil Language.find_by_extension('.nkt')
end

Expand Down Expand Up @@ -345,6 +350,8 @@ def test_primary_extension
assert_equal '.pl', Language['Perl'].primary_extension
assert_equal '.py', Language['Python'].primary_extension
assert_equal '.rb', Language['Ruby'].primary_extension
assert_equal '.js', Language['JavaScript'].primary_extension
assert_equal '.coffee', Language['CoffeeScript'].primary_extension

# This is a nasty requirement, but theres some code in GitHub that
# expects this. Really want to drop this.
Expand Down

0 comments on commit aa7c849

Please sign in to comment.