arboleya / coffee-toaster

Minimalist build system for CoffeeScript.
114 stars 23 forks source link

Fix generated toaster.coffee file indentation to use spaces #32

Closed paulspringett closed 12 years ago

paulspringett commented 12 years ago

Replaces the tabs in toaster.coffee with 2 spaces

paulspringett commented 12 years ago

@serpentem any thoughts on this?

arboleya commented 12 years ago

Hi @paulspringett, your suggestion doesn't actually fix the problem, right? Instead it just polarize the problem, it will cause the same issues to those who use tabs instead of spaces -- the opposite case.

I'm thinking about it but I guess there's no hybrid solution for this, each user must to assure the indentation is as expected according their prefs.

paulspringett commented 12 years ago

@arboleya you are correct, it will not fix the problem for those using tabs. At the risk of starting a tabs vs spaces war, the general convention in CoffeeScript is to use spaces though.

On a more constructive note I believe coffee-toaster parses the contents of the toaster.coffee file here? Am I right in saying there's no fallback here if the cs.compile fails? I imagine this will result in a compile error if the file uses a mix of tabs and spaces? It doesn't seem to catch this at the moment. Can this be caught and displayed to the developer?

Cheers.

arboleya commented 12 years ago

@paulspringett Indeed, an error msg would do the job. I'm working on the next version of toaster which will bring big changes, I'll see if I can improve also this part.

I'm closing this pull request according our conversation, the other issue will remain open until I can look at it.

Thank you.