Closed Konard closed 1 year ago
I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.
[X] package.json
✅ Commit d80e9bf
• Add a name, version, description, main, and scripts field to the package.json file. • In the scripts field, add a start script that runs `node index.js`. • Add a dependencies field and include any necessary dependencies for the project.
[X] index.js
✅ Commit 7b15b01
• Import the necessary dependencies. • Create a function that reads a JavaScript file. • Create a function that parses the JavaScript file and adds `console.log` statements after each statement. • Create a function that overwrites the original file with the modified file. • Add a command-line interface that takes a file path as an argument and runs the above functions on that file.
[X] .gitignore
❌ Failed
• Add node_modules to the .gitignore file.
Here are my self-reviews of my changes at sweep/initialize-repo
.
Here is the 1st review
Hi there, Great job on your first pull request! There's just one small issue that needs to be addressed. In the `index.js` file, the `addLogs` function is currently adding `console.log` statements after each expression, not each statement as required by the issue. You can fix this by checking if the node type is 'Statement' instead of 'ExpressionStatement'. Here's the line that needs to be changed: - Change required in `index.js` on line 12 Keep up the good work!
I finished incorporating these changes.
🎉 Latest improvements to Sweep:
💡 To recreate the pull request edit the issue title or description. To tweak the pull request, leave a comment on the pull request. Join Our Discord
This issue is archived.
loggify-js is a cli tool that should be written in javascript.
This tool should be able to add
console.log
statement after each statement in JavaScript file.The tool should be installed globally and executed like this:
The result should be an updated in-place index.js file that has additional
console.log
statements after each statement in each funciton.Checklist
- [X] `package.json` ✅ Commit [`d80e9bf`](https://github.com/deep-foundation/loggify-js/commit/d80e9bffb4506b80308f86f5cb16f4d06131e865) - [X] `index.js` ✅ Commit [`7b15b01`](https://github.com/deep-foundation/loggify-js/commit/7b15b011ef98649a19145dcab959917a85dde9ac) - [X] `.gitignore` ❌ Failed