https://github.com/dedo-finger2/bec-remaster
A CLI Tool that helps you create and test Beecrowd challenges.
https://github.com/dedo-finger2/bec-remaster
beecrowd binary cli javascript nodejs tool
Last synced: about 2 months ago
JSON representation
A CLI Tool that helps you create and test Beecrowd challenges.
- Host: GitHub
- URL: https://github.com/dedo-finger2/bec-remaster
- Owner: Dedo-Finger2
- Created: 2024-08-01T00:47:26.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-08-03T11:39:51.000Z (almost 2 years ago)
- Last Synced: 2025-09-04T12:57:24.782Z (10 months ago)
- Topics: beecrowd, binary, cli, javascript, nodejs, tool
- Language: JavaScript
- Homepage:
- Size: 265 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Bec - Beecrowd Challenge JS Generator

🚀 A CLI tool to quickly create new Beecrowd challenges with corresponding test files writen in Jest! 🚀
---
### ✨ Features
* 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.
---
### ⬇️ Installation
```bash
npm install bec-beecrowd-generator
```
- Create your first challenge:
```bash
npx bec --generate-challenge --name 1000 --test
```
---
### 📝 Test and Challenge structure
```js
/**
* @param { Array } lines - Variable with all data provided in order
* @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(`...`);
},
);
});
```
---
### ⚙️ Usage
**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 `.challenge.js` 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 `.test.js` inside a `tests` folder.
**Generating a Challenge File With it's Test File:**
```bash
bec --generate-challenge --name --test
# or
bec --gc -n -t
```
---
### 🤓 Variables
* `--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.
---
### 📱 Contact me
- LinkedIn: https://www.linkedin.com/in/antonio-mauricio-4645832b3/
- Instagram: https://www.instagram.com/antonioalmeida2003/
- Email: antonioimportant@gmail.com