mirror of
https://github.com/theoludwig/programming-challenges.git
synced 2025-12-11 00:21:24 +01:00
build(deps): update latest
This commit is contained in:
@@ -2,13 +2,11 @@ import path from "node:path"
|
||||
import { fileURLToPath } from "node:url"
|
||||
import fs from "node:fs"
|
||||
|
||||
import replaceInFileDefault from "replace-in-file"
|
||||
import { replaceInFile } from "replace-in-file"
|
||||
import date from "date-and-time"
|
||||
|
||||
import { copyDirectory } from "../utils/copyDirectory.js"
|
||||
|
||||
const { replaceInFile } = replaceInFileDefault
|
||||
|
||||
const TEMPLATE_PATH = fileURLToPath(new URL("../../templates", import.meta.url))
|
||||
const TEMPLATE_DOCKER_PATH = path.join(TEMPLATE_PATH, "docker")
|
||||
const TEMPLATE_CHALLENGE_PATH = path.join(TEMPLATE_PATH, "challenge")
|
||||
@@ -52,7 +50,7 @@ class Template {
|
||||
}
|
||||
|
||||
private async replaceInDestination(
|
||||
options: ReplaceInDestinationOptions,
|
||||
options: ReplaceInDestinationOptions
|
||||
): Promise<void> {
|
||||
const { name, description, destination } = options
|
||||
const readmePath = path.join(destination, "README.md")
|
||||
@@ -84,7 +82,7 @@ class Template {
|
||||
} = options
|
||||
const templateLanguagePath = path.join(
|
||||
TEMPLATE_SOLUTION_PATH,
|
||||
programmingLanguageName,
|
||||
programmingLanguageName
|
||||
)
|
||||
await this.verifySupportedProgrammingLanguage(programmingLanguageName)
|
||||
await fs.promises.mkdir(destination, { recursive: true })
|
||||
@@ -115,7 +113,7 @@ class Template {
|
||||
}
|
||||
|
||||
public async verifySupportedProgrammingLanguage(
|
||||
language: string,
|
||||
language: string
|
||||
): Promise<void> {
|
||||
const languages = await this.getProgrammingLanguages()
|
||||
if (!languages.includes(language)) {
|
||||
|
||||
Reference in New Issue
Block a user