-
-
Save ibolmo/245770 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Explanation: before compression, remove any first '/' for matched: ^[ \t]*\/\/\*\* *(Compat|Fix)\:?(\w)* | |
* That are not necessary for the build. E.g. if the build is for 1.3 with no compat, then all Compat | |
* matches will lose the first '/' and therefore all of that code becomes commented. Similarly for browser | |
* fixes. | |
* | |
* During compression, the user can optionally remove the comments and thereby removing the rest of the code. | |
* | |
* Otherwise, there is not JavaScript performance loss due to commenting. Parser will just skip. | |
* | |
* NOTE: Compat Source Code needs to be after the bleeding edge, since it must be overwrite. | |
*/ | |
var MyClass = new Class({ | |
initialize: function(){ | |
this.foo = '123'; // <-- default, or rather bleeding edge | |
//** Compat: 1.2 | |
this.foo = '123' && '345'; | |
//**/ | |
//this.foo = '123';/*<compat:1.2/>*/ <-- unsupported | |
//this.foo = '123';//<compat:1.2/> <-- unsupported | |
this.foo = '345'; | |
}, | |
//** Fix: IE6 // <-- this could use a little work | |
method: function(arg20){ | |
}, | |
//** Compat 1.2 | |
method: function(arg12, arg20){ | |
}, | |
//**/ | |
//**/ | |
//* Fix: Safari2 | |
method: function(){ // <- not sure what's this suppose to do. | |
} | |
//**/ | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment