This is a Chrome extension written in ClojureScript. It is currently a WIP and therefore breaking changes may occur.
This extension adds Halstead Complexity metrics to ClojureScript code blocks for (currently) two websites, 4clojure.oxal.org and clojuredocs.org.
To build this extension locally:
- Clone this repo
- Run
npm install
from the root directory - (might not be necessary) Install shadow-cljs globally with
npm install -g shadow-cljs
- Build popup.js and content-script.js by running
npx shadow-cljs release popup
andnpx shadow-cljs release content-script
respectively - Load the contents of the extension/ folder into Chrome on chrome://extensions/ via Load Unpacked
Run tests via npx shadow-cljs watch test
- Implement basic/simple form tests
- Implemented intermediate/nested form tests
- Implement advanced tests for specific platform code examples (for example w/ "messy"/"bad code" inputs)
- Toggle metrics on/off
- Detect code fences with Clojure/ClojureScript code
- Metrics for app.klipse.tech editor window
- Metrics display on hover
- Sortable code blocks on 4clojure.oxal.org by effort, volume, or difficulty