refactor: init cypress-cucumber-preprocessor install.

This commit is contained in:
2021-09-02 17:02:45 +02:00
parent 89ec2d42ac
commit 1aa57bbd0a
5000 changed files with 408119 additions and 231 deletions

32
node_modules/cosmiconfig/dist/loadPackageProp.js generated vendored Normal file
View File

@@ -0,0 +1,32 @@
//
'use strict';
const path = require('path');
const readFile = require('./readFile');
const parseJson = require('./parseJson');
module.exports = function loadPackageProp(
packageDir ,
options
) {
const packagePath = path.join(packageDir, 'package.json');
function parseContent(content ) {
if (!content) return null;
const parsedContent = parseJson(content, packagePath);
const packagePropValue = parsedContent[options.packageProp];
if (!packagePropValue) return null;
return {
config: packagePropValue,
filepath: packagePath,
};
}
return !options.sync
? readFile(packagePath).then(parseContent)
: parseContent(readFile.sync(packagePath));
};