Skip to content

Commit

Permalink
chore: update Nx workspace to v17.2.5 and fix docs path in config
Browse files Browse the repository at this point in the history
  • Loading branch information
tinesoft committed Dec 17, 2023
1 parent a82c2f1 commit 3f61b95
Show file tree
Hide file tree
Showing 5 changed files with 886 additions and 1,136 deletions.
151 changes: 80 additions & 71 deletions docs/project.json
Original file line number Diff line number Diff line change
@@ -1,72 +1,81 @@
{
"name": "docs",
"$schema": "../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"sourceRoot": "apps/docs/src",
"tags": [],
"targets": {
"build": {
"executor": "@nx/vite:build",
"outputs": ["{options.outputPath}"],
"defaultConfiguration": "production",
"options": {
"outputPath": "dist/apps/docs"
},
"configurations": {
"development": {
"mode": "development"
},
"production": {
"mode": "production"
}
}
},
"serve": {
"executor": "@nx/vite:dev-server",
"defaultConfiguration": "development",
"options": {
"buildTarget": "docs:build"
},
"configurations": {
"development": {
"buildTarget": "docs:build:development",
"hmr": true
},
"production": {
"buildTarget": "docs:build:production",
"hmr": false
}
}
},
"preview": {
"executor": "@nx/vite:preview-server",
"defaultConfiguration": "development",
"options": {
"buildTarget": "docs:build"
},
"configurations": {
"development": {
"buildTarget": "docs:build:development"
},
"production": {
"buildTarget": "docs:build:production"
}
}
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/docs/**/*.ts"]
}
},
"test": {
"executor": "@nx/vite:test",
"outputs": ["{options.reportsDirectory}"],
"options": {
"passWithNoTests": true,
"reportsDirectory": "../coverage/docs"
}
}
}
}
"name": "docs",
"$schema": "../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"sourceRoot": "docs/src",
"tags": [],
"targets": {
"build": {
"executor": "@nx/vite:build",
"outputs": [
"{options.outputPath}"
],
"defaultConfiguration": "production",
"options": {
"outputPath": "dist/docs"
},
"configurations": {
"development": {
"mode": "development"
},
"production": {
"mode": "production"
}
}
},
"serve": {
"executor": "@nx/vite:dev-server",
"defaultConfiguration": "development",
"options": {
"buildTarget": "docs:build"
},
"configurations": {
"development": {
"buildTarget": "docs:build:development",
"hmr": true
},
"production": {
"buildTarget": "docs:build:production",
"hmr": false
}
}
},
"preview": {
"executor": "@nx/vite:preview-server",
"defaultConfiguration": "development",
"options": {
"buildTarget": "docs:build"
},
"configurations": {
"development": {
"buildTarget": "docs:build:development"
},
"production": {
"buildTarget": "docs:build:production"
}
}
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": [
"{options.outputFile}"
],
"options": {
"lintFilePatterns": [
"docs",
"apps/docs/**/*.ts"
]
}
},
"test": {
"executor": "@nx/vite:test",
"outputs": [
"{options.reportsDirectory}"
],
"options": {
"passWithNoTests": true,
"reportsDirectory": "../coverage/docs"
}
}
}
}
13 changes: 13 additions & 0 deletions docs/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,20 @@ import { defineConfig } from 'vitest/config';
import MarkdownHMR from './plugins/hmr-markdown';

export default defineConfig({
root: __dirname,
build: {
outDir: '../dist/docs',
reportCompressedSize: true,
commonjsOptions: {
transformMixedEsModules: true,
},
},
test: {
reporters: ['default'],
coverage: {
reportsDirectory: '../coverage/docs',
provider: 'v8',
},
globals: true,
cache: {
dir: '../node_modules/.vitest',
Expand Down
10 changes: 3 additions & 7 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,13 @@
"inputs": ["production", "^production"],
"cache": true
},
"e2e": {
"inputs": ["default", "^production"],
"lint": {
"inputs": ["default", "{workspaceRoot}/.eslintrc.json", "{workspaceRoot}/.eslintignore"],
"cache": true
},
"test": {
"@nx/vite:test": {
"inputs": ["default", "^production"],
"cache": true
},
"lint": {
"inputs": ["default", "{workspaceRoot}/.eslintrc.json", "{workspaceRoot}/.eslintignore"],
"cache": true
}
},
"namedInputs": {
Expand Down
Loading

0 comments on commit 3f61b95

Please sign in to comment.