Permalink
Browse files

Ensure that all source files end with a single `\n`

This was done by first checking all files in the repository root by hand, and
then by doing the following:

    $ npm i get-stdin@4
    $ cat clean.coffee
    fs = require 'fs'
    stdin = require 'get-stdin'

    stdin (text) ->
      for file in text.trim().split('\n')
        contents = fs.readFileSync file
          .toString().replace /\s*$/, '\n'
        fs.writeFileSync file, contents
      return
    $ ls !(node_modules)/**/*.coffee | coffee clean.coffee
  • Loading branch information...
1 parent 98dd1bf commit 6c6c8d48bfc1d7b0ce0f4171a72dd1a7dbc2d3fc @lydell lydell committed Sep 3, 2015
View
@@ -1 +1 @@
-coffeescript.org
+coffeescript.org
View
@@ -6,4 +6,4 @@
* Use the same coding style as the rest of the [codebase](https://github.com/jashkenas/coffeescript/tree/master/src). If you're just getting started with CoffeeScript, there's a nice [style guide](https://github.com/polarmobile/coffeescript-style-guide).
-* In your pull request, do not add documentation to `index.html` or re-build the minified `coffee-script.js` file. We'll do those things before cutting a new release.
+* In your pull request, do not add documentation to `index.html` or re-build the minified `coffee-script.js` file. We'll do those things before cutting a new release.
@@ -2,5 +2,3 @@
SkinnyMochaHalfCaffScript Compiler v1.0
Released under the MIT License
###
-
-
@@ -6,4 +6,4 @@ task 'build:parser', 'rebuild the Jison parser', (options) ->
require 'jison'
code = require('./lib/grammar').parser.generate()
dir = options.output or 'lib'
- fs.writeFile "#{dir}/parser.js", code
+ fs.writeFile "#{dir}/parser.js", code
@@ -1,4 +1,4 @@
for filename in list
do (filename) ->
fs.readFile filename, (err, contents) ->
- compile filename, contents.toString()
+ compile filename, contents.toString()
@@ -6,4 +6,4 @@ grade = (student) ->
else
"C"
-eldest = if 24 > 21 then "Liz" else "Ike"
+eldest = if 24 > 21 then "Liz" else "Ike"
@@ -1,3 +1,3 @@
# The first ten global properties.
-globals = (name for name of window)[0...10]
+globals = (name for name of window)[0...10]
@@ -3,4 +3,4 @@ Account = (customer, cart) ->
@cart = cart
$('.shopping_cart').on 'click', (event) =>
- @customer.purchase @cart
+ @customer.purchase @cart
@@ -5,4 +5,4 @@ perfectSquares = ->
yield num * num
return
-window.ps or= perfectSquares()
+window.ps or= perfectSquares()
@@ -2,4 +2,4 @@ outer = 1
changeNumbers = ->
inner = -1
outer = 10
-inner = changeNumbers()
+inner = changeNumbers()
@@ -7,4 +7,4 @@ switch day
go bingo
go dancing
when "Sun" then go church
- else go work
+ else go work
@@ -13,4 +13,4 @@ index = (list, target) ->
console.log 2 is index [10, 20, 30, 40, 50], 30
console.log 4 is index [-97, 35, 67, 88, 1200], 1200
-console.log 0 is index [0, 45, 70], 0
+console.log 0 is index [0, 45, 70], 0
@@ -31,4 +31,4 @@ console.log match("s..t", "spit")
console.log match("^..t", "buttercup")
console.log match("i..$", "cherries")
console.log match("o*m", "vrooooommm!")
-console.log match("^hel*o$", "hellllllo")
+console.log match("^hel*o$", "hellllllo")
@@ -164,4 +164,4 @@ infinity = Infinity
nan = NaN
# Deleting.
-delete secret.identity
+delete secret.identity
@@ -22,4 +22,4 @@ binary_search = (items, value) ->
console.log 2 is binary_search [10, 20, 30, 40, 50], 30
console.log 4 is binary_search [-97, 35, 67, 88, 1200], 1200
console.log 0 is binary_search [0, 45, 70], 0
-console.log -1 is binary_search [0, 45, 70], 10
+console.log -1 is binary_search [0, 45, 70], 10
@@ -8,4 +8,4 @@ bubble_sort = (list) ->
# Test the function.
console.log bubble_sort([3, 2, 1]).join(' ') is '1 2 3'
-console.log bubble_sort([9, 2, 7, 0, 1]).join(' ') is '0 1 2 7 9'
+console.log bubble_sort([9, 2, 7, 0, 1]).join(' ') is '0 1 2 7 9'
@@ -15,4 +15,4 @@ merge_sort = (list) ->
# Test the function.
console.log merge_sort([3, 2, 1]).join(' ') is '1 2 3'
-console.log merge_sort([9, 2, 7, 0, 1]).join(' ') is '0 1 2 7 9'
+console.log merge_sort([9, 2, 7, 0, 1]).join(' ') is '0 1 2 7 9'
@@ -20,4 +20,4 @@ selection_sort = (list) ->
# Test the function.
console.log selection_sort([3, 2, 1]).join(' ') is '1 2 3'
-console.log selection_sort([9, 2, 7, 0, 1]).join(' ') is '0 1 2 7 9'
+console.log selection_sort([9, 2, 7, 0, 1]).join(' ') is '0 1 2 7 9'

1 comment on commit 6c6c8d4

Please sign in to comment.