diff --git a/README.md b/README.md index 379ebd7c..2d2561b3 100644 --- a/README.md +++ b/README.md @@ -188,8 +188,12 @@ generateApi({ } }) .then(({ files, configuration }) => { - files.forEach(({ content, name }) => { - fs.writeFile(path, content); + files.forEach(({ fileContent, fileName, fileExtension }) => { + const path = `${PATH_TO_OUTPUT_DIR}/${fileName}${fileExtension}`; + fs.writeFile(path, fileContent, (err) => { + if (err) throw err; + console.log(`${path} has been saved!`); + }); }); }) .catch(e => console.error(e))