Skip to content

Commit 81baf82

Browse files
committed
Merge pull request #89 from rickharrison/codecov
Adds code coverage.
2 parents 6f0ca6d + 6e384f9 commit 81baf82

File tree

4 files changed

+20
-3
lines changed

4 files changed

+20
-3
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules
22
tmp
3-
.idea
3+
.idea
4+
coverage

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#broccoli-asset-rev
22

3+
![Build Status](https://circleci.com/gh/rickharrison/broccoli-asset-rev.svg?style=shield)
4+
[![codecov.io](https://codecov.io/github/rickharrison/broccoli-asset-rev/coverage.svg?branch=master)](https://codecov.io/github/rickharrison/broccoli-asset-rev?branch=master)
5+
[![npm](https://img.shields.io/npm/v/npm.svg)](https://www.npmjs.com/package/broccoli-asset-rev)
6+
37
[Broccoli](https://github.com/broccolijs/broccoli) plugin to add fingerprint checksums to your files and update the source to reflect the new filenames.
48

59
Turns
@@ -46,7 +50,7 @@ var assetNode = new AssetRev(node, {
4650
- `customHash` - Default: none - If set, overrides the md5 checksum calculation with the result of calling `customHash(buffer, pathToFile)`. If it is not a `function`, `customHash` is used as the hash value. If it is set to `null`, fingerprinting is skipped and only prepending occurs.
4751
- `generateAssetMap` - Default: false. If true, will generate a `assetMap.json` file in a `assets` directory on the output node. This file contains a mapping of the original asset name to the fingerprinted asset, like the following:
4852
- `assetMapPath` - Default: `'assets/assetMap-HASH.json'` - The path in the destination folder to store the `assetMap.json` in. Only for the default value, `HASH` will be replace with the fingerprint of the file.
49-
53+
5054
```js
5155
{
5256
assets: {

circle.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
machine:
2+
node:
3+
version: 4.2.4
4+
5+
test:
6+
override:
7+
- npm run test:cover
8+
post:
9+
- cat ./coverage/lcov.info | ./node_modules/.bin/codecov

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"main": "index.js"
88
},
99
"scripts": {
10-
"test": "mocha tests"
10+
"test": "mocha tests",
11+
"test:cover": "istanbul cover ./node_modules/mocha/bin/_mocha tests"
1112
},
1213
"repository": {
1314
"type": "git",
@@ -39,6 +40,8 @@
3940
"devDependencies": {
4041
"broccoli": "^0.13.3",
4142
"broccoli-merge-trees": "^0.2.1",
43+
"codecov": "^1.0.1",
44+
"istanbul": "^0.4.1",
4245
"mocha": "^2.0.1",
4346
"sinon": "^1.14.1",
4447
"walk-sync": "^0.1.3"

0 commit comments

Comments
 (0)