Skip to content

Commit

Permalink
part 01
Browse files Browse the repository at this point in the history
  • Loading branch information
TimHi committed Dec 1, 2023
1 parent 3b5e329 commit 3b0bece
Show file tree
Hide file tree
Showing 13 changed files with 3,489 additions and 2,041 deletions.
9 changes: 6 additions & 3 deletions Typescript/2023/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "prettier"],
"plugins": [
"@typescript-eslint",
"prettier"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"rules": {
"no-console": 1,
"no-console": 0,
"prettier/prettier": 2
}
}
}
3 changes: 3 additions & 0 deletions Typescript/2023/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ dist-ssr
*.njsproj
*.sln
*.sw?
.DS_Store

*/**/full.txt
2 changes: 1 addition & 1 deletion Typescript/2023/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Installation

Node is required, e.g through [nvm](https://github.com/nvm-sh/nvm).
After cloning the repository run `pnpm i`. After this you're done.
After cloning the repository run `npm i`. After this you're done.

## Running

Expand Down
2 changes: 1 addition & 1 deletion Typescript/2023/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function SolvePartTwo(): number {

const createTypeScriptFile = (day) => {
const renderedTemplate = nunjucks.renderString(dayTemplate, { day: day }); // Pass day as an object with key 'day'
const filename = path.join("src", "days", `day${day}.ts`);
const filename = path.join("src", `day${day}`, `day${day}.ts`);
console.log(filename);
fs.writeFileSync(filename, renderedTemplate);
console.log(`Created TypeScript file: day${day}.ts`);
Expand Down
Loading

0 comments on commit 3b0bece

Please sign in to comment.