Fixed some typos
diff --git a/JavascriptRefactoring.wiki b/JavascriptRefactoring.wiki index 9d576c5..beee59d 100644 --- a/JavascriptRefactoring.wiki +++ b/JavascriptRefactoring.wiki
@@ -13,12 +13,12 @@ To run jsLint and check melange.js and melange.graph.js files, you need java installed in your local computer, just run {{{ -./jsLint.sh +./jslint.sh }}} in {{{ scripts/ }}} directory. -The check is based to a slightly modified source of [http://www.jslint.com/rhino/index.html Jslint rhino version]. +The check is based on a slightly modified source of [http://www.jslint.com/rhino/index.html jsLint rhino version]. Following the defaults: {{{ @@ -43,17 +43,17 @@ In practice: * check for use of == and != (always use === and !==) - * check if immediate function calling are surrounded by parenthesis + * check if immediate function calling are surrounded by parens * disallow uncorrect breaking of lines * assumes a browser * prevent undefined variables * check whitespaces before an anonymous function calling * check if there are 2 whitespaces per indentation - * ignores {{{ window }} and {{{ jQuery }}} being global variables + * ignores {{{ window }}} and {{{ jQuery }}} being global variables * do not tolerate use of {{{ eval }}} statement * do not tolerate unfiltered {{{ for...in }}} statements -If you want to check your code copying and pasting in the [http://www.jslint.com/ online version of jsLint] (you will receive more useful infos as output), set the following [http://www.jslint.com/#options jsLint options]: +If you want to check your code, copying and pasting in the [http://www.jslint.com/ online version of jsLint] (you will receive more useful infos as output), set the following [http://www.jslint.com/#options jsLint options]: * Strict white space * Assume a browser @@ -78,15 +78,19 @@ ==jsCoverage== -To work, jsCoverage needs to modify the source code of the scripts to "instrument" it. As the code will be modified and copied to another directory, also tests that points to the former code needs to be redirected to point to the instrumented code. This could be avoided by moving the original code to another directory first, but at the moment it just keeps things as they are. +To work, jsCoverage needs to modify the source code of the scripts to "instrument" it. As the code will be modified and copied to another directory, also tests that points to the former code needs to be redirected to point to the instrumented code. This could be avoided by moving the original code to another directory first, but, at the moment, it just keeps things as they are. So, to instrument the code and modify the [http://bitbucket.org/dhans/statistic-module-for-melange/src/tip/tests/javascript/melange.tests.html melange.tests.html file] just run -{{{ jscoverage_on.sh }}} +{{{ + +jscoverage_on.sh + +}}} from {{{ ./scripts }}} directory. -It will create a {{{ ./app/soc/content/js_coverage }}} directory and will modify, as said, {{{ ./tests/javascript/melange.tests.html }}} file. It ignores, at the moment, {{{ slot-allocator-090320.js }}}, because it seems not compatible for some reason. +It will create a {{{ ./app/soc/content/js_coverage }}} directory and will modify, as said, {{{ ./tests/javascript/melange.tests.html }}} file. It ignores, at the moment, {{{ slot-allocator-090320.js }}}, because it seems not to be compatible for some reasons. Then you just need to run jsUnit as described above, and click on the "JSCoverage" button. In that way, you can see the code lines covered by the tests. @@ -114,7 +118,7 @@ {{{ ./app/soc/content/js/documentation }}} -and two subdirectories under it, called {{{ private }}} and {{{ public }}} which contain documentation for developers and documentation for public API of the Javascript files. Documentation in {{{ public }}} directory will also ignore undocumented files, which can lead to incorrect output. +and two subdirectories under it, called {{{ private }}} and {{{ public }}}, which contain documentation for developers and documentation for public API of the Javascript files. Documentation in {{{ public }}} directory will also ignore undocumented files, which can lead to incorrect output. More info on _how_ to document Melange Javascript code when the refactoring will be on place. @@ -124,7 +128,11 @@ To run shrinksafe, which is in {{{ ./thirdparty/shrinksafe }}} directory, just run -{{{ shrinksafe.sh }}} +{{{ + +shrinksafe.sh + +}}} from {{{ ./scripts }}} directory.