Permalink
Browse files

fix windows line break

  • Loading branch information...
1 parent 9af93ae commit 8c19e53ce9a1e7ac4e744fc8a631b3981ef759c3 vagrant committed Apr 3, 2013
Showing with 18 additions and 3 deletions.
  1. +1 −1 Cakefile
  2. +14 −2 lib/rehab.js
  3. +3 −0 src/rehab.coffee
View
@@ -1,5 +1,5 @@
{exec, spawn} = require 'child_process'
-Rehab = require './lib/index'
+Rehab = require './lib/rehab'
build = ->
console.log "Building project from src/*.coffee to lib/rehab.js"
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -1,5 +1,6 @@
#_require ./tsort
+
wrench = require('wrench')
fs = require('fs')
path = require('path')
@@ -71,4 +72,6 @@ module.exports = class Rehab
content = fs.readFileSync(fileName, 'utf8')
lines = content.split '\n'
for line in lines
+ line = line.slice(0, -1) if line.slice(-1) == '\r'
+ line = line.trim()
depGraph.push [fileName, @parseRequiredLine(line)] if line.beginsWith @REQ_TOKEN

0 comments on commit 8c19e53

Please sign in to comment.