node.js utilities for the cloudFlight coding contest, you can use either js or ts
Install it using your package manager (using npm)
npm i @yumii.saiko/ccc-fs-util
Download the level inputs by clicking on
Then extract the .zip file in a named directory inside your project. Let's say it is the HoneyComb
level
Your file tree should then look like the following:
└───HoneyComb
└─── level_1.in
└─── level_2.in
└─── level_1.example.in
└─── main.ts <--- here you are (js or ts, it doesn't matter)
└─── package.json
In the main.ts
:
// import ccc fs utilities fn
import {executeSolutionWithLevel} from "@yumii.saiko/ccc-fs-util";
import path from "node:path"; // ensure you have node.js installed
const levelDir = path.resolve(__dirname, "HoneyComb");
executeSolutionWithLevel((input) => {
/* your solution ✨, return a string */
}, levelDir);
After these steps, you should have the following tree:
└───HoneyComb
└─── solution
└─── level_1.out
└─── level_2.out
└─── level_1.in
└─── level_2.in
└─── level_1.example.in
└─── main.ts
just submit these solutions on the ccc solution input and that's it