Skip to content

Commit

Permalink
adds missing function documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jackcmeyer authored and Erica Clark committed Jan 23, 2018
1 parent a68d91d commit e37576e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/services/sequelize-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ async function updatePackageJsonWithSequelizeDependency(projectName) {
file.writeFile(`${projectName}/package.json`, projectPackageJson);
}


/**
* Updates the index.js file to add the sequelize require statement
* @param projectName the project name
*/
async function updateIndexJs(projectName) {
let contents = file.readFile(`${projectName}/src/index.js`);
const firstLine = 'const sequelize = require(\'./db/sequelize\');\n';
Expand Down Expand Up @@ -80,6 +83,7 @@ export async function generateSequelizeFiles(configs) {
// update package.json
await updatePackageJsonWithSequelizeDependency(projectName);

// update the index.js file
await updateIndexJs(projectName);

return configs;
Expand Down

0 comments on commit e37576e

Please sign in to comment.