cell-cycle
The Cellarise Cycle framework.
Installation
npm install cell-cycle --save
Configuration
API
Modules
- cell-cycle ⇒
Object
The Cellarise Cycle framework.
- utils/coverageStats ⇒
Object
Coverage statistic utilities
- tasks/codeAnalysisTasks
A module to add gulp tasks which execute static code analysis.
- tasks/coverageStatsTasks
A module to add a gulp task which calculates coverage stats from the Istanbul reporter json-summary.
- tasks/defaultTasks
A module to add a gulp task which executes the default task.
- tasks/testTasks
A module to add gulp tasks which run test steps.
Object
The Cellarise Cycle framework.
**Returns**: Object
- - return description
Param | Type | Default | Description |
---|---|---|---|
opts | Object |
optional options | |
[opts.modulePrefix] | Object |
'gulp-' |
load dependencies that start with this prefix in package.json. |
Example
Usage:
var cell-cycle = require('cell-cycle');
Object
utils/coverageStats ⇒ Coverage statistic utilities
Returns: Object
- coverage statistics utility functions
Param | Type | Description |
---|---|---|
logger | bunyan |
A logger matching the bunyan API |
- utils/coverageStats ⇒
Object
utils/coverageStats.addStats(collection, pkg)
Helper function to append statistic properties from the provided collection to the provided package.json
Kind: static method of utils/coverageStats
Param | Type | Description |
---|---|---|
collection | Object |
a collection of statistic properties |
pkg | Object |
package.json object |
utils/coverageStats.deleteStats(collection)
Helper function to delete total, covered and skipped statistic properties from a collection
Kind: static method of utils/coverageStats
Param | Type | Description |
---|---|---|
collection | Object |
a collection of statistic properties |
utils/coverageStats.badgeColour(collection, stat, watermarks)
Helper function to determine badge colour
Kind: static method of utils/coverageStats
Param | Type | Description |
---|---|---|
collection | Object |
a collection of statistic properties |
stat | Object |
a statistic from the collection to calculate the badge for |
watermarks | Object |
the high and low watermarks for each statistic in collection |
utils/coverageStats.calculateCoverageStats(coverageReport, packageJSON)
⇒ Object
Calculate coverage stats from an istanbul coverage.json report and append to provided package.json config.coverage.stats property. The coverage stats include an overall coverage percentage and badge colour.
Kind: static method of utils/coverageStats
Returns: Object
- updated package.json object
Param | Type | Description |
---|---|---|
coverageReport | Object |
the istanbul generated coverage.json report object |
packageJSON | Object |
the package.json object |
tasks/codeAnalysisTasks
A module to add gulp tasks which execute static code analysis.
Param | Type | Description |
---|---|---|
gulp | Gulp |
The gulp module |
context | Object |
An object containing the following properties: |
context.cwd | String |
The current working directory |
context.package | Object |
The package.json for the module |
context.argv | Array |
The arguments past to the gulp task |
context.logger | bunyan |
A logger matching the bunyan API |
tasks/codeAnalysisTasks~code_analysis
⇒ through2
A gulp build task to execute static code analysis on the files at package.json:directories.lib
.
The report results are saved to package.json:directories.reports
Kind: inner property of tasks/codeAnalysisTasks
Returns: through2
- stream
tasks/coverageStatsTasks
A module to add a gulp task which calculates coverage stats from the Istanbul reporter json-summary.
Param | Type | Description |
---|---|---|
gulp | Gulp |
The gulp module |
context | Object |
An object containing the following properties: |
context.cwd | String |
The current working directory |
context.package | json |
The package.json for the module |
context.argv | Array |
The arguments past to the gulp task |
context.logger | bunyan |
A logger matching the bunyan API |
tasks/coverageStatsTasks~coverage_stats
⇒ through2
A gulp build task to calculate coverage stats from the Istanbul reporter json-summary. Coverage stats are appended to package.json config.coverage.stats property. The coverage stats include an overall coverage percentage and badge colour.
Kind: inner property of tasks/coverageStatsTasks
Returns: through2
- stream
tasks/defaultTasks
A module to add a gulp task which executes the default task.
Param | Type | Description |
---|---|---|
gulp | Gulp |
The gulp module |
tasks/defaultTasks~default
: Gulp
A gulp build task to run the default tasks. The following tasks are executed in sequence: ["test"] The sequence works by piping each task to the next.
Kind: inner property of tasks/defaultTasks
Param | Type | Description |
---|---|---|
cb | function |
callback |
tasks/testTasks
A module to add gulp tasks which run test steps.
Param | Type | Description |
---|---|---|
gulp | Gulp |
The gulp module |
context | Object |
An object containing the following properties: |
context.cwd | String |
The current working directory |
context.package | Object |
The package.json for the module |
context.argv | Array |
The arguments past to the gulp task |
context.logger | bunyan |
A logger matching the bunyan API |
- tasks/testTasks
~instrument
⇒through2
~test_cover
⇒through2
~test_cover
⇒through2
~test_cover
⇒through2
~write_coverage
⇒through2
~test
⇒through2
tasks/testTasks~instrument
⇒ through2
A gulp build task to instrument files. Istanbul will override the node require() function to redirect to the instrumented files.
Kind: inner property of tasks/testTasks
Returns: through2
- stream
tasks/testTasks~test_cover
⇒ through2
A gulp build task to run test steps and calculate test coverage. Test steps results will be output using mocha-bamboo-reporter-bgo reporter. This task executes the Instrument task as a prerequisite.
Kind: inner property of tasks/testTasks
Returns: through2
- stream
tasks/testTasks~test_cover
⇒ through2
A gulp build task to run test steps and calculate test coverage (but not output test coverage to prevent gulp-istanbul issues with webdriverIO). Test steps results will be output using mocha-bamboo-reporter-bgo reporter. This task executes the Instrument task as a prerequisite.
Kind: inner property of tasks/testTasks
Returns: through2
- stream
tasks/testTasks~test_cover
⇒ through2
A gulp build task to run test steps and calculate test coverage (but not output test coverage to prevent gulp-istanbul issues with webdriverIO). Test steps results will be output using mocha-bamboo-reporter-bgo reporter. This task executes the Instrument task as a prerequisite.
Kind: inner property of tasks/testTasks
Returns: through2
- stream
tasks/testTasks~write_coverage
⇒ through2
A gulp build task to write coverage.
Kind: inner property of tasks/testTasks
Returns: through2
- stream
tasks/testTasks~test
⇒ through2
A gulp build task to run test steps and calculate test coverage. Test steps results will be output using spec reporter.
Kind: inner property of tasks/testTasks
Returns: through2
- stream
documented by jsdoc-to-markdown.
Changelog
Type | ID | Summary | |
---|---|---|---|
Version: 0.0.1 - released 2016-08-12 | |||
Non-functional | CYCLE-2 | Package: Update package dependencies |
License
MIT License (MIT). All rights not explicitly granted in the license are reserved.
Copyright (c) 2015 John Barry
Dependencies
cell-cycle@0.0.0 - "MIT License (MIT)", documented by npm-licenses.