1.0.2 • Published 2 years ago
@yumii.saiko/ccc-fs-util v1.0.2
FS CCC UTILS
node.js fs utilities for the cloudFlight coding contest, you can use either js or ts
Usage note
Install it using your package manager (using npm)
npm i @yumii.saiko/ccc-fs-utilDownload 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.jsonIn 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
└─── solution_1.out
└─── solution_2.out
└─── level_1.in
└─── level_2.in
└─── level_1.example.in
└─── main.tsjust submit these solutions on the ccc solution input and that's it