Skip to content

denodell/High-Quality-JavaScript-Code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

High Quality JavaScript Code

Code example to go with Den Odell's presentation on High Quality JavaScript Code: https://www.slideshare.net/denodell/highquality-javascript-code

Files

  • dates.js - Simple script showing module pattern, dependencies, ECMAScript 5 strict mode, and documentation in YUIDoc format
  • dates-spec.js - Simple Jasmine unit tests for testing the methods exposed from dates.js
  • GruntFile.js and package.json - Configure Grunt task runner with JSHint, Jasmine, and Istanbul

Running

  • Install Node.js
  • Install Grunt-CLI
  • Open command prompt/terminal and cd to this project folder
  • Execute npm install on the command line to download all the dependencies and plugins for Grunt (first time only)
  • Execute grunt on the command line - this will run JSHint, Jasmine, Istanbul, complexityReport.js and YUIDoc, feeding back results to the command prompt window
  • Check the generated reports folder for the code coverage report generated by Istanbul after running the Jasmine unit tests, and details of any issues running the cyclomatic complexity report
  • Check the YUIDoc generated HTML documentation extracted from your code by looking in the docs folder
  • If you want to have Grunt running all the time, listening for file changes and auto-running, then execute grunt watch at the command line

Links

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published