From 838aecea34dec706c0e48b292dce00ef4f85f31b Mon Sep 17 00:00:00 2001 From: Claas Augner Date: Mon, 3 Feb 2025 13:10:18 +0100 Subject: [PATCH] chore(tool): remove build-robots-txt command --- package.json | 4 ++-- tool/cli.ts | 24 ------------------------ 2 files changed, 2 insertions(+), 26 deletions(-) diff --git a/package.json b/package.json index 6122bb6f534c..5fab270c9144 100644 --- a/package.json +++ b/package.json @@ -27,8 +27,8 @@ "build:legacy::curriculum": "cross-env NODE_ENV=production NODE_OPTIONS=\"--no-warnings=ExperimentalWarning --loader ts-node/esm\" node build/build-curriculum.ts", "build:legacy::docs": "cross-env NODE_ENV=production NODE_OPTIONS=\"--no-warnings=ExperimentalWarning --loader ts-node/esm\" node build/cli.ts -n", "build:legacy:blog": "cross-env NODE_ENV=production NODE_OPTIONS=\"--no-warnings=ExperimentalWarning --loader ts-node/esm\" node build/build-blog.ts", - "build:legacy:prepare": "yarn build:client && yarn build:ssr && yarn tool:legacy popularities && yarn tool:legacy spas && yarn tool:legacy gather-git-history && yarn tool:legacy build-robots-txt", - "build:prepare": "yarn build:client && yarn build:ssr && yarn tool:legacy build-robots-txt", + "build:legacy:prepare": "yarn build:client && yarn build:ssr && yarn tool:legacy popularities && yarn tool:legacy spas && yarn tool:legacy gather-git-history", + "build:prepare": "yarn build:client && yarn build:ssr", "build:ssr": "cross-env NODE_ENV=production NODE_OPTIONS=\"--no-warnings=ExperimentalWarning --loader ts-node/esm\" node ssr/prepare.ts && webpack --mode=production --config=ssr/webpack.config.js", "build:sw": "cd client/pwa && yarn && yarn build:prod", "build:sw-dev": "cd client/pwa && yarn && yarn build", diff --git a/tool/cli.ts b/tool/cli.ts index 268c48db208e..efe617e31484 100644 --- a/tool/cli.ts +++ b/tool/cli.ts @@ -25,13 +25,11 @@ import { buildDocument, gatherGitHistory, buildSPAs } from "../build/index.js"; import { isValidLocale } from "../libs/locale-utils/index.js"; import type { Doc } from "../libs/types/document.js"; import { - ALWAYS_ALLOW_ROBOTS, BUILD_OUT_ROOT, CONTENT_ROOT, CONTENT_TRANSLATED_ROOT, } from "../libs/env/index.js"; import { runMakePopularitiesFile } from "./popularities.js"; -import { runBuildRobotsTxt } from "./build-robots-txt.js"; import { syncAllTranslatedContent } from "./sync-translated-content.js"; import { macroUsageReport } from "./macro-usage-report.js"; import * as kumascript from "../kumascript/index.js"; @@ -869,28 +867,6 @@ program }) ) - .command( - "build-robots-txt", - "Generate a robots.txt in the build root depending ALWAYS_ALLOW_ROBOTS" - ) - .option("--outfile ", "name of the generated file", { - default: path.join(BUILD_OUT_ROOT, "robots.txt"), - }) - .action( - tryOrExit(async ({ options, logger }: BuildRobotsTxtActionParameters) => { - const { outfile } = options; - await runBuildRobotsTxt(outfile); - logger.info( - chalk.yellow( - `Generated ${path.relative( - ".", - outfile - )} based on ALWAYS_ALLOW_ROBOTS=${ALWAYS_ALLOW_ROBOTS}` - ) - ); - }) - ) - .command("spas", "Build (SSR) all the skeleton apps for single page apps") .action( tryOrExit(async ({ options }) => {