UNPKG

chimp

Version:

Your development companion for doing quality, faster.

16 lines (15 loc) 558 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const path = require('path'); exports.default = (fileList, projectMainPath) => { return fileList.map((graphqlFilePath) => { const possibleModuleName = path.basename(graphqlFilePath, '.graphql'); return { name: possibleModuleName, graphqlFilePath, graphqlFileRootPath: graphqlFilePath .replace(`${projectMainPath}/src/`, '') .replace(`${possibleModuleName}.graphql`, ''), }; }); };