A tool that parses HTML or JavaScript files and inspects all JavaScript code found. Outputs several metrics for the analyzed source.
All code is written in JavaScript and runs on the NodeJS platform.
- Install Node > 6
- Upgrade NPM to latest:
npm install -g npm@next
- Install Python 2.7.x
- Install Gcc and G++ (or MS VC++ Build tools, if windows)
Download and process all dependencies:
npm install
Try the sample script:
npm start
The sample script takes metrics from some files located at the test/demo
folder.
You can (and should) change that to any path containing HTML and/or JS files.
Take a look at the script to learn how to do that. It should be straightforward.
The test scripts is a very good source on the specific behavior of each function. To run it, use:
npm test
The test framework used is Mocha, mainly due to its capacity to test server-side code seamlessly.
This repo follows the angular commit message style.