Skip to content

Commit 95b8209

Browse files
Merge pull request #5277 from Shopify/rename-doc-scripts
Tidy up documentation scripts
2 parents 8b805e7 + 6c6ef29 commit 95b8209

File tree

8 files changed

+42
-43
lines changed

8 files changed

+42
-43
lines changed

.github/workflows/pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
with:
4040
node-version: "22"
4141
- name: Build TSDoc docs
42-
run: pnpm nx run-many --all --skip-nx-cache --target=docs:generate --output-style=stream
42+
run: pnpm build-api-docs --output-style=stream
4343
- name: Build Markdown files into HTML
4444
uses: actions/jekyll-build-pages@v1
4545
with:

.github/workflows/shopify-cli.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -255,14 +255,14 @@ jobs:
255255
run: pnpm refresh-readme
256256
- name: Check if there are changes
257257
run: 'test -z "$(git status --porcelain "packages/cli/README.md" )" || { echo -e "Run pnpm refresh-readme before pushing new commands or flags. Diff here:\n\n$(git diff)" ; exit 1; }'
258-
- name: Refresh documentation
259-
run: pnpm refresh-documentation
258+
- name: Refresh code documentation
259+
run: pnpm refresh-code-documentation
260260
- name: Check if there are changes
261-
run: 'test -z "$(git status --porcelain)" || { echo -e "Run pnpm refresh-documentation when you update functions with autogenerated examples. Diff here:\n\n$(git diff)" ; exit 1; }'
261+
run: 'test -z "$(git status --porcelain)" || { echo -e "Run pnpm refresh-code-documentation when you update functions with autogenerated examples. Diff here:\n\n$(git diff)" ; exit 1; }'
262262
- name: Build shopify.dev docs
263-
run: pnpm update-docs
263+
run: pnpm build-dev-docs
264264
- name: Check if there are changes
265-
run: 'test -z "$(git status --porcelain "docs-shopify.dev/generated/*.json" )" || { echo -e "Run (pnpm update-docs) before pushing new commands or flags." ; exit 1; }'
265+
run: 'test -z "$(git status --porcelain "docs-shopify.dev/generated/*.json" )" || { echo -e "Run (pnpm build-dev-docs) before pushing new commands or flags." ; exit 1; }'
266266

267267
pr-platform-dependent:
268268
name: '[PR] Test with Node ${{ matrix.node }} in ${{ matrix.os }}'

package.json

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,39 @@
22
"private": true,
33
"type": "module",
44
"scripts": {
5-
"package": "bin/package.js",
6-
"update-bugsnag": "bin/update-bugsnag.js",
7-
"graph": "nx graph",
8-
"shopify": "nx build cli && node packages/cli/bin/dev.js",
9-
"shopify:run": "node packages/cli/bin/dev.js",
10-
"create-app": "nx build create-app && cross-env SHOPIFY_FLAG_PACKAGE_MANAGER=npm node packages/create-app/bin/dev.js",
5+
"build-api-docs": "nx run-many --target=build-api-docs --all --skip-nx-cache",
6+
"build-dev-docs": "pnpm shopify docs generate && sh ./bin/docs/build-dev-docs.sh",
7+
"build:affected": "nx affected --target=build",
8+
"build": "nx run-many --target=build --all --skip-nx-cache",
9+
"bundle-for-release": "nx run-many --target=bundle --all --skip-nx-cache",
10+
"changeset-build-no-docs": "changeset version && pnpm install --no-frozen-lockfile && pnpm build && bin/update-cli-kit-version.js",
11+
"changeset-manifests": "changeset version && pnpm install --no-frozen-lockfile && pnpm refresh-manifests && pnpm refresh-readme && pnpm refresh-code-documentation && bin/update-cli-kit-version.js",
1112
"clean": "nx run-many --target=clean --all --skip-nx-cache && nx reset",
12-
"docs:generate": "nx run-many --target=docs:generate --all --skip-nx-cache",
13-
"lint": "nx run-many --target=lint --all --skip-nx-cache",
13+
"create-app": "nx build create-app && cross-env SHOPIFY_FLAG_PACKAGE_MANAGER=npm node packages/create-app/bin/dev.js",
14+
"deploy-experimental": "node bin/deploy-experimental.js",
15+
"graph": "nx graph",
16+
"graphql-codegen:get-graphql-schemas": "bin/get-graphql-schemas.js",
17+
"graphql-codegen": "nx run-many --target=graphql-codegen --all",
18+
"knip": "knip",
1419
"lint:affected": "nx affected --target=lint",
15-
"lint:fix": "nx run-many --target=lint:fix --all --skip-nx-cache",
1620
"lint:fix:affected": "nx affected --target=lint:fix",
17-
"test": "nx run-many --target=test --all --skip-nx-cache",
18-
"test:unit": "nx run-many --target=test --all --skip-nx-cache --exclude=features",
19-
"test:features": "pnpm nx run features:test",
21+
"lint:fix": "nx run-many --target=lint:fix --all --skip-nx-cache",
22+
"lint": "nx run-many --target=lint --all --skip-nx-cache",
23+
"package": "bin/package.js",
24+
"refresh-code-documentation": "nx run-many --target=refresh-code-documentation --all --skip-nx-cache",
25+
"refresh-manifests": "nx run-many --target=refresh-manifests --all --skip-nx-cache && bin/prettify-manifests.js && pnpm refresh-readme",
26+
"refresh-readme": "nx run-many --target=refresh-readme --all --skip-nx-cache",
27+
"refresh-templates": "nx run-many --target=refresh-templates --all --skip-nx-cache",
28+
"shopify:run": "node packages/cli/bin/dev.js",
29+
"shopify": "nx build cli && node packages/cli/bin/dev.js",
2030
"test:affected": "nx affected --target=test",
31+
"test:features": "pnpm nx run features:test",
2132
"test:regenerate-snapshots": "nx build cli && packages/features/snapshots/regenerate.sh",
22-
"type-check": "nx run-many --target=type-check --all --skip-nx-cache",
33+
"test:unit": "nx run-many --target=test --all --skip-nx-cache --exclude=features",
34+
"test": "nx run-many --target=test --all --skip-nx-cache",
2335
"type-check:affected": "nx affected --target=type-check",
24-
"build": "nx run-many --target=build --all --skip-nx-cache",
25-
"bundle-for-release": "nx run-many --target=bundle --all --skip-nx-cache",
26-
"build:affected": "nx affected --target=build",
27-
"refresh-templates": "nx run-many --target=refresh-templates --all --skip-nx-cache",
28-
"refresh-manifests": "nx run-many --target=refresh-manifests --all --skip-nx-cache && bin/prettify-manifests.js && pnpm refresh-readme",
29-
"changeset-manifests": "changeset version && pnpm install --no-frozen-lockfile && pnpm refresh-manifests && pnpm refresh-readme && pnpm refresh-documentation && bin/update-cli-kit-version.js",
30-
"changeset-build-no-docs": "changeset version && pnpm install --no-frozen-lockfile && pnpm build && bin/update-cli-kit-version.js",
31-
"refresh-documentation": "nx run-many --target=refresh-documentation --all --skip-nx-cache",
32-
"refresh-readme": "nx run-many --target=refresh-readme --all --skip-nx-cache",
33-
"build-docs": "sh ./bin/docs/build-docs.sh",
34-
"knip": "knip",
35-
"graphql-codegen": "nx run-many --target=graphql-codegen --all",
36-
"graphql-codegen:get-graphql-schemas": "bin/get-graphql-schemas.js",
37-
"deploy-experimental": "node bin/deploy-experimental.js",
38-
"update-docs": "pnpm shopify docs generate && pnpm build-docs"
36+
"type-check": "nx run-many --target=type-check --all --skip-nx-cache",
37+
"update-bugsnag": "bin/update-bugsnag.js"
3938
},
4039
"devDependencies": {
4140
"@bugsnag/source-maps": "^2.3.1",
File renamed without changes.

packages/cli-kit/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646
"scripts": {
4747
"build": "nx build",
4848
"clean": "nx clean",
49-
"docs:generate": "nx docs:generate",
50-
"docs:open": "nx docs:open",
49+
"build-api-docs": "nx build-api-docs",
50+
"open-api-docs": "nx open-api-docs",
5151
"lint": "nx lint",
5252
"lint:fix": "nx lint:fix",
5353
"prepack": "cross-env NODE_ENV=production pnpm nx build && cp ../../README.md README.md",
@@ -56,7 +56,7 @@
5656
"test:coverage": "nx test:coverage",
5757
"test:watch": "nx test:watch",
5858
"type-check": "nx type-check",
59-
"refresh-documentation": "nx refresh-documentation"
59+
"refresh-code-documentation": "nx refresh-code-documentation"
6060
},
6161
"eslintConfig": {
6262
"extends": [

packages/cli-kit/project.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,20 @@
2727
"cwd": "packages/cli-kit"
2828
}
2929
},
30-
"docs:generate": {
30+
"build-api-docs": {
3131
"executor": "nx:run-commands",
3232
"outputs": [
3333
"{workspaceRoot}/docs"
3434
],
3535
"options": {
36-
"command": "node ./scripts/generate-docs.js",
36+
"command": "node ./scripts/build-api-docs.js",
3737
"cwd": "packages/cli-kit"
3838
}
3939
},
40-
"docs:open": {
40+
"open-api-docs": {
4141
"executor": "nx:run-commands",
4242
"dependsOn": [
43-
"docs:generate"
43+
"build-api-docs"
4444
],
4545
"options": {
4646
"command": "open ../../docs/api/cli-kit/index.html",
@@ -102,10 +102,10 @@
102102
"cwd": "packages/cli-kit"
103103
}
104104
},
105-
"refresh-documentation": {
105+
"refresh-code-documentation": {
106106
"executor": "nx:run-commands",
107107
"options": {
108-
"command": "FORCE_HYPERLINK=0 node --loader ts-node/esm ./bin/refresh-documentation.ts",
108+
"command": "FORCE_HYPERLINK=0 node --loader ts-node/esm ./bin/refresh-code-documentation.ts",
109109
"cwd": "packages/cli-kit"
110110
}
111111
},
File renamed without changes.

0 commit comments

Comments
 (0)