require author object format
This commit is contained in:
parent
1c4224adf6
commit
01dc0b4d4a
19
ci.js
19
ci.js
@ -5,8 +5,7 @@
|
|||||||
* Created by Timo Hocker <timo@scode.ovh>, May 2020
|
* Created by Timo Hocker <timo@scode.ovh>, May 2020
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* eslint-disable */
|
/* eslint-disable no-console, no-process-exit, prefer-named-capture-group */
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const fs = require ('fs');
|
const fs = require ('fs');
|
||||||
@ -30,6 +29,22 @@ if (typeof pkg.repository === 'undefined') {
|
|||||||
ok = false;
|
ok = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (typeof pkg.author === 'object') {
|
||||||
|
if (typeof pkg.author.name !== 'string') {
|
||||||
|
console.log ('author name undefined');
|
||||||
|
ok = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof pkg.author.email !== 'string') {
|
||||||
|
console.log ('author email undefined');
|
||||||
|
ok = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
console.log ('author not in object format');
|
||||||
|
ok = false;
|
||||||
|
}
|
||||||
|
|
||||||
function major (version) {
|
function major (version) {
|
||||||
return version.replace (/\.[0-9x]+$/ui, '');
|
return version.replace (/\.[0-9x]+$/ui, '');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user