yyfearth / madtalk

MadTalk - IM with Markdown
http://madtalk.yyfearth.com/
MIT License
1 stars 0 forks source link

Deal with CoffeeScript mod strict mode support #19

Closed yyfearth closed 12 years ago

yyfearth commented 12 years ago

iced coffee-script compiler does not support "use strict"

the "use strict" we put in the front of coffee file will be compiled after variable declaration by iced-coffee-script, so extra-coffee-script will do the same. but original version coffee-script seems fixed that.

(function() {
  var AudioNotifier;
  'use strict';

according to https://developer.mozilla.org/en/JavaScript/Strict_mode

To invoke strict mode for an entire script, put the exact statement "use strict"; (or 'use strict';) before any other statements.

so we can just remove that, and actually coffee-script will mandatory validate your code to ensure strict mode. or we need to wait the compiler update to support add "use strict" to the right space unless we just use original version of coffeescript.

yyfearth commented 12 years ago

i added --strict into xcoffee in 1.2.0r to enable force add "use strict", but forgot add a ; after it.

yyfearth commented 12 years ago

strict mode conflict with coffeescript 1.3 and icedcoffeescript 1.2 class.name polyfill this issue is already reported to coffeescript and will be fixed in furture and i will merge with them

yyfearth commented 12 years ago

@masonaxcte for now, we just discard all 'use strict'

masonwan commented 12 years ago

@yyfearth As long as CoffeeScript will deal with the non-standard programming style. I'm fine with that.

yyfearth commented 12 years ago

Solved