Skip to content

Commit

Permalink
Merge pull request #7 from KevinAst/feature-post031
Browse files Browse the repository at this point in the history
publish: v0.3.2 Code Coverage Tooling
  • Loading branch information
KevinAst authored Apr 6, 2017
2 parents d889de0 + 0e8db99 commit dc0f00a
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 26 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ can be used in conjunction with one another.

<!--- Badges for CI Builds --->
[![Build Status](https://travis-ci.org/KevinAst/astx-redux-util.svg?branch=master)](https://travis-ci.org/KevinAst/astx-redux-util)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/b7e9e537a56e41a692aef023fd15d9ca)](https://www.codacy.com/app/KevinAst/astx-redux-util?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=KevinAst/astx-redux-util&amp;utm_campaign=Badge_Grade)
[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/b7e9e537a56e41a692aef023fd15d9ca)](https://www.codacy.com/app/KevinAst/astx-redux-util?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=KevinAst/astx-redux-util&amp;utm_campaign=Badge_Coverage)
[![Known Vulnerabilities](https://snyk.io/test/github/kevinast/astx-redux-util/badge.svg)](https://snyk.io/test/github/kevinast/astx-redux-util)
[![NPM Version Badge](https://img.shields.io/npm/v/astx-redux-util.svg)](https://www.npmjs.com/package/astx-redux-util)

Expand Down
45 changes: 29 additions & 16 deletions SCRIPTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@ build:clean ............. clean all machine-generated build directories
prepublish .............. cleanly build/test all machine generated resources,
a pre-publication utility:
- check code quality (lint)
- verify code quality (lint)
- show outdated installed packages
- clean (delete) ALL machine generated resources
- build/test all bundled libraries (for publication)
- build documentation
- generate the code coverage report
TESTING
Expand All @@ -52,9 +55,9 @@ test:samples:watch ..... ditto (continuously)
test:all ............... run ALL our unit tests
test:all:watch ......... ditto (continuously)
Following runs ALL tests ON specified target
============================================
test:plat:{platform} ... run ALL unit tests on specified Target Platform (see below)
Following runs ALL tests ON specified Target Platform
=====================================================
test:plat:{platform} ... see discussion below
test:plat:src
test:plat:bundle
test:plat:bundle.min
Expand All @@ -63,29 +66,38 @@ test:plat:es
test:plat:all
DOCUMENTATION
=============
docs ......... build docs from JavaDoc comments (src/*.js), and Dev Guide (src/docs)
docs:clean ... clean the machine-generated docs directory
CODE QUALITY
============
check ... convenience script to:
- verify code quality (lint)
- show outdated installed packages
- run tests (against our master src)
- generate the code coverage report
lint .... verify code quality, linting BOTH production and test code.
NOTE: Real-time linting is ALSO applied on production code
through our WebPack bundler (via 'build:watch')!
check ... convenience script to:
- verify code quality (lint) and
- run tests (against our master src)
cov ........... evaluate code coverage in executing our test suite (gen report in coverage/)
cov:publish ... publish code coverage results to codacy.com (for visiblity)
cov:clean ..... clean the machine-generated coverage/ directory
pkgReview ... show outdated installed packages
DOCUMENTATION
=============
docs ......... build docs from JavaDoc comments (src/*.js), and Dev Guide (src/docs)
docs:clean ... clean the machine-generated docs/ directory
MISC
====
clean ... cleans ALL machine-generated directories (build, and docs)
clean ... cleans ALL machine-generated directories (build, docs, and coverage)
```


Expand Down Expand Up @@ -127,7 +139,7 @@ continuously ... just once, after a clean** (to prime the pump).
## Target Platform

Some npm scripts target a platform (i.e. the JS module ecosystem),
using 'plat nomenclature (i.e. platform).
using 'plat' nomenclature (i.e. platform).

Specifically:

Expand All @@ -137,6 +149,7 @@ Specifically:
Supported platforms are:

```
Env Variable
MODULE_PLATFORM What Bindings Found In NOTES
=============== =================== ======== ===================== ========================
src master ES6 source ES src/*.js DEFAULT
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,17 @@
"build:plat:es": "cross-env BABEL_ENV=es babel src --out-dir es --ignore spec,tooling",
"build:plat:lib": "cross-env BABEL_ENV=commonjs babel src --out-dir lib --ignore spec,tooling",
"build:watch": "npm run build -- --watch",
"check": "npm-run-all lint test cov",
"check": "npm-run-all lint pkgReview cov",
"clean": "npm-run-all build:clean docs:clean cov:clean",
"cov": "cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text mocha --compilers js:babel-core/register --colors \"src/**/*.spec.js\"",
"cov:clean": "rimraf coverage",
"cov:publish": "cat coverage/lcov.info | codacy-coverage",
"dev": "npm run test:lib:watch",
"docs": "./node_modules/.bin/jsdoc --configure ./src/docs/jsdoc.conf.json --verbose",
"docs:clean": "rimraf docs",
"lint": "eslint src",
"prepublish": "npm-run-all lint clean build:plat:all test:plat:all docs cov",
"lint": "echo '*** Verify code quality (lint):' && eslint src",
"pkgReview": "echo '*** Showing outdated installed packages:' && npm outdated --long || true",
"prepublish": "npm-run-all lint pkgReview clean build:plat:all test:plat:all docs cov",
"start": "npm run dev",
"test": "mocha --compilers js:babel-core/register --colors \"src/**/*.spec.js\"",
"test:all": "npm run test --",
Expand Down
19 changes: 13 additions & 6 deletions src/docs/guide/history.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Notes](https://github.com/KevinAst/astx-redux-util/releases).

<!--- Badges for CI Builds --->
[![Build Status](https://travis-ci.org/KevinAst/astx-redux-util.svg?branch=master)](https://travis-ci.org/KevinAst/astx-redux-util)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/b7e9e537a56e41a692aef023fd15d9ca)](https://www.codacy.com/app/KevinAst/astx-redux-util?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=KevinAst/astx-redux-util&amp;utm_campaign=Badge_Grade)
[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/b7e9e537a56e41a692aef023fd15d9ca)](https://www.codacy.com/app/KevinAst/astx-redux-util?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=KevinAst/astx-redux-util&amp;utm_campaign=Badge_Coverage)
[![Known Vulnerabilities](https://snyk.io/test/github/kevinast/astx-redux-util/badge.svg)](https://snyk.io/test/github/kevinast/astx-redux-util)
[![NPM Version Badge](https://img.shields.io/npm/v/astx-redux-util.svg)](https://www.npmjs.com/package/astx-redux-util)

Expand All @@ -16,7 +18,7 @@ Notes](https://github.com/KevinAst/astx-redux-util/releases).

Release | What | *When*
-------------------------|----------------------------------------|------------------
&bull; [v0.3.2](#v0.3.2) | TBD | *Mar ??, 2017*
&bull; [v0.3.2](#v0.3.2) | Code Coverage Tooling | *Apr 6, 2017*
&bull; [v0.3.1](#v0.3.1) | Extension Support with Logging Example | *Mar 27, 2017*
&bull; [v0.3.0](#v0.3.0) | Parameter Validation | *Mar 13, 2017*
&bull; [v0.2.0](#v0.2.0) | Added support for initialState | *Mar 9, 2017*
Expand All @@ -30,18 +32,23 @@ Release | What | *When*


<!-- ************************************************************* -->
<h4 class="name" id="v0.3.2">v0.3.2 - TBD *(Mar ??, 2017)*</h4>
<h4 class="name" id="v0.3.2">v0.3.2 - Code Coverage Tooling *(Apr 6, 2017)*</h4>

[Full Docs](https://astx-redux-util.js.org/0.3.2)
&bull;
[GitHub Release](https://github.com/KevinAst/astx-redux-util/releases/tag/v0.3.2)
&bull;
[GitHub Content](https://github.com/KevinAst/astx-redux-util/tree/v0.3.2)

?? running notes here ...
**NOTE**: This release is a tooling enhancement only. **The API is NOT
impacted** in any way.

1. Introduce project code coverage, with badges for both grade and coverage.

1. Added pkgReview npm script that highlights any outdated installed packages and
incorporate this into the check/prepublish scripts.


PROB NOT IMPORTANT ENOUGH TO MENTION:
- changed "User Guide" to "Dev Guide" (missed references in README/SCRIPTS)



Expand All @@ -55,7 +62,7 @@ PROB NOT IMPORTANT ENOUGH TO MENTION:
[GitHub Content](https://github.com/KevinAst/astx-redux-util/tree/v0.3.1)

**NOTE**: This release is a documentation enhancement only. **The API
is NOT impacted** in any way.
is NOT impacted** in any way.

1. The Dev Guide was refined to include {@tutorial ext} along with an
extensive {@tutorial logExt} section, showing how {@link
Expand Down
2 changes: 2 additions & 0 deletions src/docs/home.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ can be used in conjunction with one another.

<!--- Badges for CI Builds --->
[![Build Status](https://travis-ci.org/KevinAst/astx-redux-util.svg?branch=master)](https://travis-ci.org/KevinAst/astx-redux-util)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/b7e9e537a56e41a692aef023fd15d9ca)](https://www.codacy.com/app/KevinAst/astx-redux-util?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=KevinAst/astx-redux-util&amp;utm_campaign=Badge_Grade)
[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/b7e9e537a56e41a692aef023fd15d9ca)](https://www.codacy.com/app/KevinAst/astx-redux-util?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=KevinAst/astx-redux-util&amp;utm_campaign=Badge_Coverage)
[![Known Vulnerabilities](https://snyk.io/test/github/kevinast/astx-redux-util/badge.svg)](https://snyk.io/test/github/kevinast/astx-redux-util)
[![NPM Version Badge](https://img.shields.io/npm/v/astx-redux-util.svg)](https://www.npmjs.com/package/astx-redux-util)

Expand Down
2 changes: 1 addition & 1 deletion src/tooling/ModuleUnderTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import moduleFromEs from '../../es/index';


//***
//*** dynamically define our moduleUnderTest (dynamically driven from the MODULE_PLATFORM env var)
//*** dynamically define our moduleUnderTest (driven from the MODULE_PLATFORM env var)
//***

const { MODULE_PLATFORM } = process.env;
Expand Down

0 comments on commit dc0f00a

Please sign in to comment.