An CLI tool that helps you write and do codding challenges from Beecrowd website.
npm install bec-beecrowd-generator
🚀 A CLI tool to quickly create new Beecrowd challenges with corresponding test files writen in Jest! 🚀
---
* Generates a new JavaScript file with choosen challenge name.
* Creates a separate test file to write unit tests for your challenge solution before submiting it.
* Offers convenient aliases for commonly used commands.
---
``bash`
npm install bec-beecrowd-generator
- Create your first challenge:
`bash`
npx bec --generate-challenge --name 1000 --test
---
`js
/**
* @param { Array
* @returns { string }
*/
export function <% fileName %>(lines) {
// Your code goes here...
const message = ;`
console.log(message);
return message;
}
`js
import { <% fileName %> } from "./../challenges/<% fileName %>.challenge.js";
describe("Default - ...", () => {
it.each([])(
"...",
() => {
const result = <% fileName %>([]);
expect(result).toBe(...);`
},
);
});
---
Generating a Challenge File:
`bash`
bec --generate-challenge --name or
bec --gc -n
> Replace with the desired name for your challenge file (e.g., bec --generate-challenge my-new-challenge).
> This will create a new file named inside a challenges folder.
Generating a Test File:
`bash`
bec --generate-test --name or
bec --gt -n
> Replace with the same name used for your challenge file.
> This will create a new file named inside a tests folder.
Generating a Challenge File With it's Test File:
`bash`
bec --generate-challenge --name or
bec --gc -n
---
* --name {NAME} (-n {NAME}): Specifies the name for your challenge and test files.--test
* (-t`): (Optional) Flag to only generate a test file along-side with the challenge file.
---
- LinkedIn: https://www.linkedin.com/in/antonio-mauricio-4645832b3/
- Instagram: https://www.instagram.com/antonioalmeida2003/
- Email: antonioimportant@gmail.com