Skip to content

Commit

Permalink
Add docs commands to turbo (#1472)
Browse files Browse the repository at this point in the history
* Fix preview-docs command

* Add Turbo pipeline task for building and previewing docs
  • Loading branch information
gfscott committed Dec 5, 2023
1 parent b2a350a commit f352f16
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions package.json
Expand Up @@ -9,6 +9,8 @@
"dev": "npm run dev:pkg",
"dev:pkg": "cross-env LOCAL_DEV=true turbo dev --parallel --filter=./packages/*",
"dev:app": "cd templates/skeleton && cross-env LOCAL_DEV=true npm run dev --",
"docs:build": "turbo run build-docs",
"docs:preview": "turbo run preview-docs",
"preview": "turbo build --filter=./packages/* && npm run preview -w demo-store",
"lint": "eslint --no-error-on-unmatched-pattern --ext .js,.ts,.jsx,.tsx ./packages & npm run lint -w demo-store",
"format": "prettier --write --ignore-unknown ./packages && npm run format -w demo-store",
Expand Down
2 changes: 1 addition & 1 deletion packages/hydrogen-react/package.json
Expand Up @@ -126,7 +126,7 @@
"typecheck": "run-p typecheck:*",
"typecheck:code": "tsc --noEmit",
"typecheck:examples": "tsc --noEmit --project tsconfig.examples.json",
"preview-docs": "node ../docs-preview/bin/cli.js docs/generated/generated_docs_data.json"
"preview-docs": "node ../../docs/preview/bin/cli.js docs/generated/generated_docs_data.json"
},
"devDependencies": {
"@faker-js/faker": "^7.6.0",
Expand Down
10 changes: 10 additions & 0 deletions turbo.json
Expand Up @@ -11,6 +11,16 @@
"cache": false,
"persistent": true
},
"build-docs": {
"outputs": [
"docs/**/*.json"
]
},
"preview-docs": {
"outputs": [
"docs/**/*.json"
]
},
"lint": {
"outputs": []
},
Expand Down

0 comments on commit f352f16

Please sign in to comment.