src/files.js
function getFileNames(fileNames = [], componentName) {
  const defaultFileNames = {
    testFileName: `${defaultOptions.testFileName}.${componentName}`,
    componentFileName: componentName,
    styleFileName: componentName,
  }

  const formattedFileNames = Object.keys(fileNames).reduce(
    (acc, curr) => {
      acc[curr] = replaceKeys(fileNames[curr], componentName)
      return acc
    },
    { ...defaultFileNames }
  )

  return formattedFileNames
}
function getFileNames(fileNames = [], componentName) {
  const defaultFileNames = {
    testFileName: `${defaultOptions.testFileName}.${componentName}`,
    componentFileName: componentName,
    styleFileName: componentName,
  }

  const formattedFileNames = Object.keys(fileNames).reduce(
    (acc, curr) => {
      acc[curr] = replaceKeys(fileNames[curr], componentName)
      return acc
    },
    { ...defaultFileNames }
  )

  return formattedFileNames
}
function getFileNames ( fileNames = [ ] , componentName ) { const defaultFileNames = { testFileName : ` ${ defaultOptions . testFileName } ${ componentName } ` , componentFileName : componentName , styleFileName : componentName , } const formattedFileNames = Object . keys ( fileNames ) . reduce ( ( acc , curr ) => { acc [ curr ] = replaceKeys ( fileNames [ curr ] , componentName ) return acc } , { ... defaultFileNames } ) return formattedFileNames }
Return the default names replace from user filenames
@param {object} fileNames object with the user selected filenames
@param {string} componentName
@return {object} with the correct filenames
Return the default names replace from user filenames