From a39fe5e32c0ddc9d5e8811b229aa80947ca2b72b Mon Sep 17 00:00:00 2001 From: mistic100 Date: Fri, 18 Aug 2023 17:50:38 +0200 Subject: [PATCH] chore: add "npm-link" task --- package.json | 3 ++- packages/autorotate-plugin/package.json | 3 ++- packages/compass-plugin/package.json | 3 ++- packages/core/package.json | 3 ++- packages/cubemap-adapter/package.json | 3 ++- packages/cubemap-tiles-adapter/package.json | 3 ++- packages/cubemap-video-adapter/package.json | 3 ++- packages/equirectangular-tiles-adapter/package.json | 3 ++- packages/equirectangular-video-adapter/package.json | 3 ++- packages/gallery-plugin/package.json | 3 ++- packages/gyroscope-plugin/package.json | 3 ++- packages/little-planet-adapter/package.json | 3 ++- packages/map-plugin/package.json | 3 ++- packages/markers-plugin/package.json | 3 ++- packages/resolution-plugin/package.json | 3 ++- packages/settings-plugin/package.json | 3 ++- packages/stereo-plugin/package.json | 3 ++- packages/video-plugin/package.json | 3 ++- packages/virtual-tour-plugin/package.json | 3 ++- packages/visible-range-plugin/package.json | 3 ++- turbo.json | 13 ++++++++----- 21 files changed, 48 insertions(+), 25 deletions(-) diff --git a/package.json b/package.json index b2c94d6f4..81156c17a 100644 --- a/package.json +++ b/package.json @@ -7,11 +7,12 @@ "packages/*" ], "scripts": { - "format": "prettier -w .", "build": "turbo run build", + "format": "prettier -w .", "lint": "turbo run lint", "test": "turbo run test", "serve": "turbo run watch --parallel", + "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": "vuepress build docs", diff --git a/packages/autorotate-plugin/package.json b/packages/autorotate-plugin/package.json index bf945079a..d1a8d4401 100644 --- a/packages/autorotate-plugin/package.json +++ b/packages/autorotate-plugin/package.json @@ -13,7 +13,8 @@ "build": "tsup", "watch": "tsup --watch", "lint": "eslint . --fix", - "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public" + "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public", + "npm-link": "cd dist && npm link" }, "psv": { "globalName": "PhotoSphereViewer.AutorotatePlugin" diff --git a/packages/compass-plugin/package.json b/packages/compass-plugin/package.json index 73672ef44..38e0dc793 100644 --- a/packages/compass-plugin/package.json +++ b/packages/compass-plugin/package.json @@ -16,7 +16,8 @@ "build": "tsup", "watch": "tsup --watch", "lint": "eslint . --fix && stylelint \"src/**/*.scss\" --fix", - "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public" + "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public", + "npm-link": "cd dist && npm link" }, "psv": { "globalName": "PhotoSphereViewer.CompassPlugin", diff --git a/packages/core/package.json b/packages/core/package.json index f63751684..504f40aad 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -14,7 +14,8 @@ "watch": "tsup --watch", "lint": "eslint . --fix && stylelint \"src/**/*.scss\" --fix", "test": "mocha -r ts-node/register \"src/**/*.spec.ts\"", - "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public" + "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public", + "npm-link": "cd dist && npm link" }, "psv": { "globalName": "PhotoSphereViewer", diff --git a/packages/cubemap-adapter/package.json b/packages/cubemap-adapter/package.json index 5b1db624e..6ba204962 100644 --- a/packages/cubemap-adapter/package.json +++ b/packages/cubemap-adapter/package.json @@ -13,7 +13,8 @@ "build": "tsup", "watch": "tsup --watch", "lint": "eslint . --fix", - "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public" + "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public", + "npm-link": "cd dist && npm link" }, "psv": { "globalName": "PhotoSphereViewer.CubemapAdapter" diff --git a/packages/cubemap-tiles-adapter/package.json b/packages/cubemap-tiles-adapter/package.json index e16a7d61d..822953836 100644 --- a/packages/cubemap-tiles-adapter/package.json +++ b/packages/cubemap-tiles-adapter/package.json @@ -14,7 +14,8 @@ "build": "tsup", "watch": "tsup --watch", "lint": "eslint . --fix", - "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public" + "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public", + "npm-link": "cd dist && npm link" }, "psv": { "globalName": "PhotoSphereViewer.CubemapTilesAdapter" diff --git a/packages/cubemap-video-adapter/package.json b/packages/cubemap-video-adapter/package.json index 5541cc982..c2e3d835d 100644 --- a/packages/cubemap-video-adapter/package.json +++ b/packages/cubemap-video-adapter/package.json @@ -13,7 +13,8 @@ "build": "tsup", "watch": "tsup --watch", "lint": "eslint . --fix", - "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public" + "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public", + "npm-link": "cd dist && npm link" }, "psv": { "globalName": "PhotoSphereViewer.CubemapVideoAdapter" diff --git a/packages/equirectangular-tiles-adapter/package.json b/packages/equirectangular-tiles-adapter/package.json index 427aa82cf..f3eadb5a5 100644 --- a/packages/equirectangular-tiles-adapter/package.json +++ b/packages/equirectangular-tiles-adapter/package.json @@ -13,7 +13,8 @@ "build": "tsup", "watch": "tsup --watch", "lint": "eslint . --fix", - "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public" + "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public", + "npm-link": "cd dist && npm link" }, "psv": { "globalName": "PhotoSphereViewer.EquirectangularTilesAdapter" diff --git a/packages/equirectangular-video-adapter/package.json b/packages/equirectangular-video-adapter/package.json index 7909cf557..6ee969f73 100644 --- a/packages/equirectangular-video-adapter/package.json +++ b/packages/equirectangular-video-adapter/package.json @@ -13,7 +13,8 @@ "build": "tsup", "watch": "tsup --watch", "lint": "eslint . --fix", - "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public" + "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public", + "npm-link": "cd dist && npm link" }, "psv": { "globalName": "PhotoSphereViewer.EquirectangularVideoAdapter" diff --git a/packages/gallery-plugin/package.json b/packages/gallery-plugin/package.json index b4aebd635..a3538f75e 100644 --- a/packages/gallery-plugin/package.json +++ b/packages/gallery-plugin/package.json @@ -13,7 +13,8 @@ "build": "tsup", "watch": "tsup --watch", "lint": "eslint . --fix && stylelint \"src/**/*.scss\" --fix", - "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public" + "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public", + "npm-link": "cd dist && npm link" }, "psv": { "globalName": "PhotoSphereViewer.GalleryPlugin", diff --git a/packages/gyroscope-plugin/package.json b/packages/gyroscope-plugin/package.json index 68f27041f..8ab7d4deb 100644 --- a/packages/gyroscope-plugin/package.json +++ b/packages/gyroscope-plugin/package.json @@ -13,7 +13,8 @@ "build": "tsup", "watch": "tsup --watch", "lint": "eslint . --fix", - "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public" + "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public", + "npm-link": "cd dist && npm link" }, "psv": { "globalName": "PhotoSphereViewer.GyroscopePlugin" diff --git a/packages/little-planet-adapter/package.json b/packages/little-planet-adapter/package.json index ddc5b13bf..79bb0b74e 100644 --- a/packages/little-planet-adapter/package.json +++ b/packages/little-planet-adapter/package.json @@ -13,7 +13,8 @@ "build": "tsup", "watch": "tsup --watch", "lint": "eslint . --fix", - "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public" + "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public", + "npm-link": "cd dist && npm link" }, "psv": { "globalName": "PhotoSphereViewer.LittlePlanetAdapter" diff --git a/packages/map-plugin/package.json b/packages/map-plugin/package.json index fb33b44dd..841219897 100644 --- a/packages/map-plugin/package.json +++ b/packages/map-plugin/package.json @@ -13,7 +13,8 @@ "build": "tsup", "watch": "tsup --watch", "lint": "eslint . --fix && stylelint \"src/**/*.scss\" --fix", - "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public" + "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public", + "npm-link": "cd dist && npm link" }, "psv": { "globalName": "PhotoSphereViewer.MapPlugin", diff --git a/packages/markers-plugin/package.json b/packages/markers-plugin/package.json index b8b0a65d1..995a8a50d 100644 --- a/packages/markers-plugin/package.json +++ b/packages/markers-plugin/package.json @@ -13,7 +13,8 @@ "build": "tsup", "watch": "tsup --watch", "lint": "eslint . --fix && stylelint \"src/**/*.scss\" --fix", - "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public" + "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public", + "npm-link": "cd dist && npm link" }, "psv": { "globalName": "PhotoSphereViewer.MarkersPlugin", diff --git a/packages/resolution-plugin/package.json b/packages/resolution-plugin/package.json index fd9d8b386..9271690b7 100644 --- a/packages/resolution-plugin/package.json +++ b/packages/resolution-plugin/package.json @@ -14,7 +14,8 @@ "build": "tsup", "watch": "tsup --watch", "lint": "eslint . --fix", - "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public" + "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public", + "npm-link": "cd dist && npm link" }, "psv": { "globalName": "PhotoSphereViewer.ResolutionPlugin" diff --git a/packages/settings-plugin/package.json b/packages/settings-plugin/package.json index e47dd2155..11dcacf4f 100644 --- a/packages/settings-plugin/package.json +++ b/packages/settings-plugin/package.json @@ -13,7 +13,8 @@ "build": "tsup", "watch": "tsup --watch", "lint": "eslint . --fix && stylelint \"src/**/*.scss\" --fix", - "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public" + "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public", + "npm-link": "cd dist && npm link" }, "psv": { "globalName": "PhotoSphereViewer.SettingsPlugin", diff --git a/packages/stereo-plugin/package.json b/packages/stereo-plugin/package.json index 2dff26631..3e2fdf98f 100644 --- a/packages/stereo-plugin/package.json +++ b/packages/stereo-plugin/package.json @@ -14,7 +14,8 @@ "build": "tsup", "watch": "tsup --watch", "lint": "eslint . --fix", - "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public" + "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public", + "npm-link": "cd dist && npm link" }, "psv": { "globalName": "PhotoSphereViewer.StereoPlugin" diff --git a/packages/video-plugin/package.json b/packages/video-plugin/package.json index 311afff62..963f173e0 100644 --- a/packages/video-plugin/package.json +++ b/packages/video-plugin/package.json @@ -16,7 +16,8 @@ "build": "tsup", "watch": "tsup --watch", "lint": "eslint . --fix && stylelint \"src/**/*.scss\" --fix", - "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public" + "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public", + "npm-link": "cd dist && npm link" }, "psv": { "globalName": "PhotoSphereViewer.VideoPlugin", diff --git a/packages/virtual-tour-plugin/package.json b/packages/virtual-tour-plugin/package.json index c97556bb1..5303aba3d 100644 --- a/packages/virtual-tour-plugin/package.json +++ b/packages/virtual-tour-plugin/package.json @@ -18,7 +18,8 @@ "build": "tsup", "watch": "tsup --watch", "lint": "eslint . --fix && stylelint \"src/**/*.scss\" --fix", - "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public" + "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public", + "npm-link": "cd dist && npm link" }, "psv": { "globalName": "PhotoSphereViewer.VirtualTourPlugin", diff --git a/packages/visible-range-plugin/package.json b/packages/visible-range-plugin/package.json index 023947a60..8b7416b14 100644 --- a/packages/visible-range-plugin/package.json +++ b/packages/visible-range-plugin/package.json @@ -13,7 +13,8 @@ "build": "tsup", "watch": "tsup --watch", "lint": "eslint . --fix", - "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public" + "publish-dist": "cd dist && npm publish --tag=$NPM_TAG --access=public", + "npm-link": "cd dist && npm link" }, "psv": { "globalName": "PhotoSphereViewer.VisibleRangePlugin" diff --git a/turbo.json b/turbo.json index 561c3ae76..ea49bbf76 100644 --- a/turbo.json +++ b/turbo.json @@ -13,19 +13,22 @@ "outputs": ["dist/**"] }, "lint": { - "inputs": ["src/**"], - "outputs": [] + "inputs": ["src/**"] }, "test": { - "inputs": ["src/**"], - "outputs": [] + "inputs": ["src/**"] }, "watch": { - "cache": false + "cache": false, + "persistent": true }, "//#watch": { "cache": false }, + "npm-link": { + "dependsOn": ["build"], + "cache": false + }, "publish-dist": { "dependsOn": ["^publish-dist"], "cache": false