Skip to content

Commit

Permalink
chore: turbo cache build doc
Browse files Browse the repository at this point in the history
  • Loading branch information
mistic100 committed Jan 4, 2024
1 parent c5d9053 commit 8af584c
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,4 @@ jobs:
- name: build
run: |
yarn install
yarn doc:build
yarn ci:build-doc
8 changes: 4 additions & 4 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ function listFiles(dir) {
}

function getFiles(dir) {
const absoluteDir = posixJoin(process.cwd(), dir);
const absoluteDir = posixJoin(__dirname, '..', dir);
return listFiles(absoluteDir).map((f) => f.substr(absoluteDir.length + 1));
}

module.exports = {
dest: './public',
dest: '../public',
title: 'Photo Sphere Viewer',
description: 'A JavaScript library to display Photo Sphere panoramas',
// prettier-ignore
Expand Down Expand Up @@ -124,7 +124,7 @@ module.exports = {
{
title: 'Official plugins',
collapsable: false,
children: getFiles('docs/plugins').filter((f) => {
children: getFiles('plugins').filter((f) => {
return f !== 'README.md' && f !== 'writing-a-plugin.md' && f !== 'third-party.md';
}),
},
Expand All @@ -137,7 +137,7 @@ module.exports = {
sidebarDepth: 0,
collapsable: false,
children: (() => {
const demoFiles = getFiles('docs/demos')
const demoFiles = getFiles('demos')
.map((f) => f.split('/'))
.filter((f) => f.length === 2)
.reduce((groups, [dir, file]) => {
Expand Down
25 changes: 25 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "photo-sphere-viewer-doc",
"version": "0.0.0",
"private": true,
"license": "MIT",
"scripts": {
"build-doc": "cross-env NODE_OPTIONS=--openssl-legacy-provider vuepress build",
"serve-doc": "cross-env NODE_OPTIONS=--openssl-legacy-provider vuepress dev"
},
"dependencies": {
"@vuepress/plugin-active-header-links": "^1.9.9",
"@vuepress/plugin-back-to-top": "^1.9.9",
"@vuepress/plugin-google-analytics": "^1.9.9",
"codesandbox-import-utils": "^2.2.3",
"date-fns": "^2.30.0",
"lodash": "^4.17.21",
"marked": "^4.2.3",
"raw-loader": "^4.0.2",
"vue-material": "^1.0.0-beta-16",
"vue-slider-component": "^3.2.24",
"vue-swatches": "^2.1.1",
"vuepress": "^1.9.9",
"yaml": "^2.3.1"
}
}
24 changes: 6 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"private": true,
"license": "MIT",
"workspaces": [
"docs",
"packages/*"
],
"scripts": {
Expand All @@ -14,36 +15,28 @@
"serve": "turbo run watch --parallel",
"serve:filter": "run() { turbo run watch --parallel --filter=$1... --filter=//; }; run",
"npm-link": "turbo run npm-link --output-logs=new-only",
"doc:build": "yarn doc:vuepress && yarn doc:typedoc",
"doc:typedoc": "node ./build/generate-typedoc-readme.mjs && typedoc --plugin typedoc-plugin-extras --out public/api",
"doc:vuepress": "cross-env NODE_OPTIONS=--openssl-legacy-provider vuepress build docs",
"doc:serve": "cross-env NODE_OPTIONS=--openssl-legacy-provider vuepress dev docs",
"doc:build": "turbo run build-doc",
"doc:serve": "turbo run serve-doc",
"ci:build": "turbo run lint build test --cache-dir=.turbo",
"ci:build-doc": "turbo run build-doc --cache-dir=.turbo",
"ci:version": "set-versions --workspaces",
"ci:publish": "turbo run publish-dist --concurrency=1",
"build-doc": "node ./build/generate-typedoc-readme.mjs && typedoc --plugin typedoc-plugin-extras --out public/api",
"watch": "node build/liveserver.mjs"
},
"devDependencies": {
"@types/mocha": "^10.0.1",
"@types/three": "^0.159.0",
"@typescript-eslint/eslint-plugin": "^6.17.0",
"@typescript-eslint/parser": "^6.17.0",
"@vuepress/plugin-active-header-links": "^1.9.9",
"@vuepress/plugin-back-to-top": "^1.9.9",
"@vuepress/plugin-google-analytics": "^1.9.9",
"alive-server": "^1.3.0",
"codesandbox-import-utils": "^2.2.3",
"cross-env": "^7.0.3",
"date-fns": "^2.30.0",
"esbuild-plugin-external-global": "^1.0.1",
"esbuild-sass-plugin": "^2.16.0",
"eslint": "^8.56.0",
"lodash": "^4.17.21",
"marked": "^4.2.3",
"mocha": "^10.2.0",
"postcss": "^8.4.21",
"prettier": "^2.8.8",
"raw-loader": "^4.0.2",
"sass": "^1.69.0",
"scss-bundle": "^3.1.2",
"set-versions": "^1.0.3",
Expand All @@ -57,11 +50,6 @@
"turbo": "^1.11.1",
"typedoc": "^0.25.0",
"typedoc-plugin-extras": "^3.0.0",
"typescript": "^5.2.2",
"vue-material": "^1.0.0-beta-16",
"vue-slider-component": "^3.2.24",
"vue-swatches": "^2.1.1",
"vuepress": "^1.9.9",
"yaml": "^2.3.1"
"typescript": "^5.2.2"
}
}
7 changes: 7 additions & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,19 @@
"test": {
"inputs": ["src/**"]
},
"build-doc": {},
"//#build-doc": {
"dependsOn": ["photo-sphere-viewer-doc#build-doc"]
},
"watch": {
"cache": false
},
"//#watch": {
"cache": false
},
"serve-doc": {
"cache": false
},
"npm-link": {
"dependsOn": ["build"],
"cache": false
Expand Down

0 comments on commit 8af584c

Please sign in to comment.