Skip to content

Commit d6cb86c

Browse files
sarahsCopilot
andauthored
Support "npm run writers" to display a list of writer-focused tools (#58326)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 00e523c commit d6cb86c

File tree

17 files changed

+287
-67
lines changed

17 files changed

+287
-67
lines changed

package-lock.json

Lines changed: 16 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@
1919
"build": "next build --webpack",
2020
"check-content-type": "tsx src/workflows/check-content-type.ts",
2121
"check-github-github-links": "tsx src/links/scripts/check-github-github-links.ts",
22+
"clone-early-access": "./src/early-access/scripts/clone-locally",
2223
"clone-translations": "./src/languages/scripts/clone-translations.sh",
2324
"cmp-files": "tsx src/workflows/cmp-files.ts",
2425
"content-changes-table-comment": "tsx src/workflows/content-changes-table-comment.ts",
2526
"copy-fixture-data": "tsx src/tests/scripts/copy-fixture-data.ts",
2627
"count-translation-corruptions": "cross-env NODE_OPTIONS=--max-old-space-size=8192 tsx src/languages/scripts/count-translation-corruptions.ts",
28+
"create-early-access-branch": "./src/early-access/scripts/create-branch",
2729
"create-enterprise-issue": "tsx src/ghes-releases/scripts/create-enterprise-issue.ts",
2830
"cta-builder": "tsx src/content-render/scripts/cta-builder.ts",
2931
"debug": "cross-env NODE_ENV=development ENABLED_LANGUAGES=en nodemon --inspect src/frame/server.ts",
@@ -102,7 +104,8 @@
102104
"validate-asset-images": "tsx src/assets/scripts/validate-asset-images.ts",
103105
"validate-github-github-docs-urls": "tsx src/links/scripts/validate-github-github-docs-urls/index.ts",
104106
"warmup-remotejson": "tsx src/archives/scripts/warmup-remotejson.ts",
105-
"what-docs-early-access-branch": "tsx src/early-access/scripts/what-docs-early-access-branch.ts"
107+
"what-docs-early-access-branch": "tsx src/early-access/scripts/what-docs-early-access-branch.ts",
108+
"writers": "tsx src/workflows/writers-help-metadata.ts"
106109
},
107110
"lint-staged": {
108111
"*.{ts,tsx}": "eslint --cache --fix",

src/content-linter/scripts/find-unsed-variables.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/**
2-
* This script iterates over all pages and all reusables and looks for
3-
* mentions of variables in Liquid syntax. For example,
2+
* @purpose Writer tool
3+
* @description Look for mentions of variables in Liquid syntax across all pages
4+
*
5+
* For example,
46
*
57
* ---
68
* title: '{% data variables.product.prodname_mobile %} is cool'

src/content-linter/scripts/lint-content.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/**
2+
* @purpose Writer tool
3+
* @description Run the Docs content linter, specifying paths and optional rules
4+
*/
15
// @ts-nocheck
26
import fs from 'fs'
37
import path from 'path'

src/content-render/scripts/add-content-type.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
// This script auto-populates the `contentType` frontmatter property based on
2-
// the directory location of the content file.
3-
// Run with:
4-
// npm run-script -- add-content-type --help
1+
/**
2+
* @purpose Writer tool
3+
* @description Auto-populate the `contentType` frontmatter property based on the directory location of the content file
4+
*/
55

66
import fs from 'fs'
77
import path from 'path'

src/content-render/scripts/cta-builder.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/**
2+
* @purpose Writer tool
3+
* @description Create a properly formatted Call-to-Action URL with tracking parameters
4+
*/
15
import { Command } from 'commander'
26
import readline from 'readline'
37
import chalk from 'chalk'

0 commit comments

Comments
 (0)