Skip to content

Commit

Permalink
fix(packages): publish docs along side build output
Browse files Browse the repository at this point in the history
  • Loading branch information
Schlomoh committed Sep 9, 2024
1 parent 4516127 commit 470496c
Show file tree
Hide file tree
Showing 7 changed files with 687 additions and 126 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/version-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
with:
fetch-depth: 0

- name: Setup Node.js
Expand All @@ -27,9 +27,6 @@ jobs:
- name: Install dependencies
run: npm install

- name: Build packages
run: npx nx run-many --targets build --exclude vctrl/official-website,official-website-e2e

- name: Setup Git
run: |
git config --global user.email "<>"
Expand Down
759 changes: 650 additions & 109 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"@gltf-transform/core": "^4.0.8",
"@gltf-transform/extensions": "^4.0.8",
"@gltf-transform/functions": "^4.0.8",
"@nx/rollup": "19.6.3",
"@radix-ui/react-accordion": "^1.2.0",
"@radix-ui/react-avatar": "^1.1.0",
"@radix-ui/react-dialog": "^1.1.1",
Expand Down Expand Up @@ -56,8 +55,10 @@
"@nx/js": "19.6.3",
"@nx/playwright": "19.6.3",
"@nx/react": "19.6.3",
"@nx/rollup": "^19.6.3",
"@nx/vite": "19.6.3",
"@nx/web": "19.6.3",
"@nx/workspace": "^19.6.3",
"@playwright/test": "^1.36.0",
"@swc-node/register": "~1.9.1",
"@swc/cli": "~0.3.12",
Expand Down
18 changes: 15 additions & 3 deletions packages/hooks/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,28 @@
"tags": [],
"targets": {
"nx-release-publish": {
"executor": "@nx/js:release-publish",
"dependsOn": ["build"],
"options": {
"packageRoot": "/dist/packages/vctrl/hooks"
"packageRoot": "dist/packages/vctrl/hooks"
}
},
"build": {
"dependsOn": ["clean-copy"],
"executor": "@nx/vite:build",
"options": {
"outputPath": "dist/packages/vctrl/hooks",
"configFile": "packages/hooks/vite.config.ts"
"configFile": "packages/hooks/vite.config.ts",
"assets": ["packages/hooks/*.md"]
}
},
"clean-copy": {
"executor": "nx:run-commands",
"outputs": [],
"options": {
"commands": [
"rm -rf dist/packages/vctrl/hooks/*",
"rsync -rat packages/hooks/*.md dist/packages/vctrl/hooks/"
]
}
}
}
Expand Down
3 changes: 1 addition & 2 deletions packages/hooks/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ export default defineConfig({
// Configuration for building your library.
// See: https://vitejs.dev/guide/build.html#library-mode
build: {
outDir: '../../dist/packages/@vctrl/hooks',
emptyOutDir: true,
emptyOutDir: false,
reportCompressedSize: true,
commonjsOptions: {
transformMixedEsModules: true,
Expand Down
18 changes: 15 additions & 3 deletions packages/viewer/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,28 @@
"tags": [],
"targets": {
"nx-release-publish": {
"executor": "@nx/js:release-publish",
"dependsOn": ["build"],
"options": {
"packageRoot": "/dist/packages/vctrl/viewer"
"packageRoot": "dist/packages/vctrl/viewer"
}
},
"build": {
"dependsOn": ["clean-copy"],
"executor": "@nx/vite:build",
"options": {
"outputPath": "dist/packages/vctrl/viewer",
"configFile": "packages/viewer/vite.config.ts"
"configFile": "packages/viewer/vite.config.ts",
"assets": ["packages/viewer/*.md"]
}
},
"clean-copy": {
"executor": "nx:run-commands",
"outputs": [],
"options": {
"commands": [
"rm -rf dist/packages/vctrl/hooks/*",
"rsync -rat packages/hooks/*.md dist/packages/vctrl/hooks/"
]
}
}
}
Expand Down
7 changes: 3 additions & 4 deletions packages/viewer/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/// <reference types='vitest' />
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import dts from 'vite-plugin-dts';
import * as path from 'path';
import dts from 'vite-plugin-dts';
import react from '@vitejs/plugin-react';
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';

export default defineConfig({
Expand Down Expand Up @@ -33,8 +33,7 @@ export default defineConfig({
// Configuration for building your library.
// See: https://vitejs.dev/guide/build.html#library-mode
build: {
outDir: '../../dist/packages/@vctrl/viewer',
emptyOutDir: true,
emptyOutDir: false,
reportCompressedSize: true,
commonjsOptions: {
transformMixedEsModules: true,
Expand Down

0 comments on commit 470496c

Please sign in to comment.