Skip to content

Commit d38057c

Browse files
author
James Wright
committed
calling merge config in entry point, as it should not be a dep of the runner
1 parent 79b6be0 commit d38057c

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

lib/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const intro = require('./intro');
44
const runner = require('./runner');
55
const localAppServer = require('./localAppServer');
66
const resultsPrinter = require('./resultsPrinter');
7+
const mergeConfig = require('./mergeConfig');
78

89
module.exports = {
910
_isInvalid(results) {
@@ -38,6 +39,8 @@ module.exports = {
3839
return Promise.reject(new Error('No config specified!'));
3940
}
4041

42+
config = mergeConfig(config);
43+
4144
// No destructing in Node.js 4 brah
4245
const appServerOptions = config.localAppServer;
4346
const failHard = config.failHard;

lib/runner.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
const markupService = require('./services/markupService');
44
const w3Service = require('./services/w3Service');
55
const Result = require('./models/Result');
6-
const mergeConfig = require('./mergeConfig');
76

87
module.exports = {
98
_createPromise(url, validatorUrl) {
@@ -15,12 +14,8 @@ module.exports = {
1514
},
1615

1716
run(config) {
18-
const mergedConfig = mergeConfig(config);
19-
const promises = mergedConfig.urls.map(url => this._createPromise(url, mergedConfig.validatorUrl));
17+
const promises = config.urls.map(url => this._createPromise(url, config.validatorUrl));
2018

21-
return Promise.all(promises)
22-
.catch(e => {
23-
console.error(e);
24-
});
19+
return Promise.all(promises);
2520
}
2621
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "valimate",
3-
"version": "2.2.1",
3+
"version": "2.2.2",
44
"description": "Automated HTML validation tool.",
55
"repository": "https://github.com/jamesseanwright/valimate",
66

0 commit comments

Comments
 (0)