diff --git a/.github/workflows/lighthouse-report.yml b/.github/workflows/lighthouse-report.yml index ec141b243774..bbd6692d1e4a 100644 --- a/.github/workflows/lighthouse-report.yml +++ b/.github/workflows/lighthouse-report.yml @@ -42,7 +42,7 @@ jobs: script: | const results = ${{ steps.lighthouse_audit.outputs.manifest }} const links = ${{ steps.lighthouse_audit.outputs.links }} - const createLighthouseReport = (await import(`${process.env.GITHUB_WORKSPACE}/admin/scripts/format-lighthouse-score.mjs`)).default; + const createLighthouseReport = (await import(`${process.env.GITHUB_WORKSPACE}/admin/scripts/formatLighthouseReport.js`)).default; const comment = createLighthouseReport({ results, links }); core.setOutput("comment", comment); diff --git a/admin/scripts/copyUntypedFiles.mjs b/admin/scripts/copyUntypedFiles.js similarity index 100% rename from admin/scripts/copyUntypedFiles.mjs rename to admin/scripts/copyUntypedFiles.js diff --git a/admin/scripts/format-lighthouse-score.mjs b/admin/scripts/formatLighthouseReport.js similarity index 100% rename from admin/scripts/format-lighthouse-score.mjs rename to admin/scripts/formatLighthouseReport.js diff --git a/admin/scripts/generateExamples.mjs b/admin/scripts/generateExamples.js similarity index 100% rename from admin/scripts/generateExamples.mjs rename to admin/scripts/generateExamples.js diff --git a/admin/scripts/package.json b/admin/scripts/package.json new file mode 100644 index 000000000000..03df6476e25f --- /dev/null +++ b/admin/scripts/package.json @@ -0,0 +1,7 @@ +{ + "name": "docu-scripts", + "description": "These are the scripts used in various places of Docusaurus maintenance", + "private": true, + "license": "MIT", + "type": "module" +} diff --git a/admin/scripts/image-resize.mjs b/admin/scripts/resizeImage.js similarity index 100% rename from admin/scripts/image-resize.mjs rename to admin/scripts/resizeImage.js diff --git a/package.json b/package.json index de33e023d0c9..ec51b53832d6 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "start:website:baseUrl": "yarn workspace website start:baseUrl", "start:website:blogOnly": "yarn workspace website start:blogOnly", "start:website:deployPreview": "cross-env NETLIFY=true CONTEXT='deploy-preview' yarn workspace website start", - "examples:generate": "node admin/scripts/generateExamples.mjs", + "examples:generate": "node admin/scripts/generateExamples.js", "build": "yarn build:packages && yarn build:website", "build:packages": "lerna run build --no-private", "build:website": "yarn workspace website build", diff --git a/packages/docusaurus-plugin-debug/package.json b/packages/docusaurus-plugin-debug/package.json index 3c68544c139b..3382fcab737a 100644 --- a/packages/docusaurus-plugin-debug/package.json +++ b/packages/docusaurus-plugin-debug/package.json @@ -5,10 +5,10 @@ "main": "lib/index.js", "types": "src/plugin-debug.d.ts", "scripts": { - "build": "tsc --build && node ../../admin/scripts/copyUntypedFiles.mjs && prettier --config ../../.prettierrc --write \"lib/theme/**/*.js\"", + "build": "tsc --build && node ../../admin/scripts/copyUntypedFiles.js && prettier --config ../../.prettierrc --write \"lib/theme/**/*.js\"", "watch": "run-p -c copy:watch build:watch", "build:watch": "tsc --build --watch", - "copy:watch": "node ../../admin/scripts/copyUntypedFiles.mjs --watch" + "copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch" }, "publishConfig": { "access": "public" diff --git a/packages/docusaurus-plugin-ideal-image/package.json b/packages/docusaurus-plugin-ideal-image/package.json index 4feb2ff1b92c..5bda29fd0203 100644 --- a/packages/docusaurus-plugin-ideal-image/package.json +++ b/packages/docusaurus-plugin-ideal-image/package.json @@ -5,10 +5,10 @@ "main": "lib/index.js", "types": "src/plugin-ideal-image.d.ts", "scripts": { - "build": "tsc --build && node ../../admin/scripts/copyUntypedFiles.mjs && prettier --config ../../.prettierrc --write \"lib/theme/**/*.js\"", + "build": "tsc --build && node ../../admin/scripts/copyUntypedFiles.js && prettier --config ../../.prettierrc --write \"lib/theme/**/*.js\"", "watch": "run-p -c copy:watch build:watch", "build:watch": "tsc --build --watch", - "copy:watch": "node ../../admin/scripts/copyUntypedFiles.mjs --watch" + "copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch" }, "publishConfig": { "access": "public" diff --git a/packages/docusaurus-plugin-pwa/package.json b/packages/docusaurus-plugin-pwa/package.json index 92465928d16c..4bc0e86f34d5 100644 --- a/packages/docusaurus-plugin-pwa/package.json +++ b/packages/docusaurus-plugin-pwa/package.json @@ -5,10 +5,10 @@ "main": "lib/index.js", "types": "src/plugin-pwa.d.ts", "scripts": { - "build": "tsc --build && node ../../admin/scripts/copyUntypedFiles.mjs && prettier --config ../../.prettierrc --write \"lib/theme/**/*.js\"", + "build": "tsc --build && node ../../admin/scripts/copyUntypedFiles.js && prettier --config ../../.prettierrc --write \"lib/theme/**/*.js\"", "watch": "run-p -c copy:watch build:watch", "build:watch": "tsc --build --watch", - "copy:watch": "node ../../admin/scripts/copyUntypedFiles.mjs --watch" + "copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch" }, "publishConfig": { "access": "public" diff --git a/packages/docusaurus-theme-classic/package.json b/packages/docusaurus-theme-classic/package.json index 15810bc39893..359930cbbc67 100644 --- a/packages/docusaurus-theme-classic/package.json +++ b/packages/docusaurus-theme-classic/package.json @@ -14,10 +14,10 @@ }, "license": "MIT", "scripts": { - "build": "tsc --build && node ../../admin/scripts/copyUntypedFiles.mjs && prettier --config ../../.prettierrc --write \"lib/theme/**/*.js\"", + "build": "tsc --build && node ../../admin/scripts/copyUntypedFiles.js && prettier --config ../../.prettierrc --write \"lib/theme/**/*.js\"", "watch": "run-p -c copy:watch build:watch", "build:watch": "tsc --build --watch", - "copy:watch": "node ../../admin/scripts/copyUntypedFiles.mjs --watch" + "copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch" }, "dependencies": { "@docusaurus/core": "2.0.0-beta.20", diff --git a/packages/docusaurus-theme-common/package.json b/packages/docusaurus-theme-common/package.json index 59a1d91f87c2..ff097aa08e95 100644 --- a/packages/docusaurus-theme-common/package.json +++ b/packages/docusaurus-theme-common/package.json @@ -13,10 +13,10 @@ "./Details": "./lib/components/Details/index.js" }, "scripts": { - "build": "tsc && node ../../admin/scripts/copyUntypedFiles.mjs", + "build": "tsc && node ../../admin/scripts/copyUntypedFiles.js", "watch": "run-p -c copy:watch build:watch", "build:watch": "tsc --watch", - "copy:watch": "node ../../admin/scripts/copyUntypedFiles.mjs --watch" + "copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch" }, "publishConfig": { "access": "public" diff --git a/packages/docusaurus-theme-live-codeblock/package.json b/packages/docusaurus-theme-live-codeblock/package.json index 04d45ca3d01f..f107b6b8b302 100644 --- a/packages/docusaurus-theme-live-codeblock/package.json +++ b/packages/docusaurus-theme-live-codeblock/package.json @@ -11,10 +11,10 @@ "access": "public" }, "scripts": { - "build": "tsc --build && node ../../admin/scripts/copyUntypedFiles.mjs && prettier --config ../../.prettierrc --write \"lib/theme/**/*.js\"", + "build": "tsc --build && node ../../admin/scripts/copyUntypedFiles.js && prettier --config ../../.prettierrc --write \"lib/theme/**/*.js\"", "watch": "run-p -c copy:watch build:watch", "build:watch": "tsc --build --watch", - "copy:watch": "node ../../admin/scripts/copyUntypedFiles.mjs --watch" + "copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch" }, "repository": { "type": "git", diff --git a/packages/docusaurus-theme-search-algolia/package.json b/packages/docusaurus-theme-search-algolia/package.json index 9c062e117952..aaf040ba3c33 100644 --- a/packages/docusaurus-theme-search-algolia/package.json +++ b/packages/docusaurus-theme-search-algolia/package.json @@ -21,10 +21,10 @@ }, "license": "MIT", "scripts": { - "build": "tsc --build && node ../../admin/scripts/copyUntypedFiles.mjs && prettier --config ../../.prettierrc --write \"lib/theme/**/*.js\"", + "build": "tsc --build && node ../../admin/scripts/copyUntypedFiles.js && prettier --config ../../.prettierrc --write \"lib/theme/**/*.js\"", "watch": "run-p -c copy:watch build:watch", "build:watch": "tsc --build --watch", - "copy:watch": "node ../../admin/scripts/copyUntypedFiles.mjs --watch" + "copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch" }, "dependencies": { "@docsearch/react": "^3.0.0", diff --git a/packages/docusaurus/package.json b/packages/docusaurus/package.json index ac1af6b0a864..85720169700d 100644 --- a/packages/docusaurus/package.json +++ b/packages/docusaurus/package.json @@ -24,10 +24,10 @@ "docusaurus": "bin/docusaurus.mjs" }, "scripts": { - "build": "tsc --build && node ../../admin/scripts/copyUntypedFiles.mjs", + "build": "tsc --build && node ../../admin/scripts/copyUntypedFiles.js", "watch": "run-p -c copy:watch build:watch", "build:watch": "tsc --build --watch", - "copy:watch": "node ../../admin/scripts/copyUntypedFiles.mjs --watch" + "copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch" }, "bugs": { "url": "https://github.com/facebook/docusaurus/issues"