@nx/vite 0.0.0-pr-22179-271588f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -0
- package/README.md +68 -0
- package/executors.d.ts +8 -0
- package/executors.js +27 -0
- package/executors.js.map +1 -0
- package/executors.json +46 -0
- package/generators.json +25 -0
- package/index.d.ts +8 -0
- package/index.js +26 -0
- package/index.js.map +1 -0
- package/migrations.json +253 -0
- package/package.json +62 -0
- package/plugin.d.ts +1 -0
- package/plugin.js +21 -0
- package/plugin.js.map +1 -0
- package/plugins/nx-tsconfig-paths.plugin.d.ts +24 -0
- package/plugins/nx-tsconfig-paths.plugin.js +132 -0
- package/plugins/nx-tsconfig-paths.plugin.js.map +1 -0
- package/plugins/rollup-replace-files.plugin.d.ts +16 -0
- package/plugins/rollup-replace-files.plugin.js +51 -0
- package/plugins/rollup-replace-files.plugin.js.map +1 -0
- package/src/executors/build/build.impl.d.ts +13 -0
- package/src/executors/build/build.impl.js +187 -0
- package/src/executors/build/build.impl.js.map +1 -0
- package/src/executors/build/compat.d.ts +2 -0
- package/src/executors/build/compat.js +12 -0
- package/src/executors/build/compat.js.map +1 -0
- package/src/executors/build/schema.d.js +3 -0
- package/src/executors/build/schema.d.js.map +1 -0
- package/src/executors/build/schema.d.ts +10 -0
- package/src/executors/build/schema.json +67 -0
- package/src/executors/dev-server/compat.d.ts +2 -0
- package/src/executors/dev-server/compat.js +12 -0
- package/src/executors/dev-server/compat.js.map +1 -0
- package/src/executors/dev-server/dev-server.impl.d.ts +7 -0
- package/src/executors/dev-server/dev-server.impl.js +136 -0
- package/src/executors/dev-server/dev-server.impl.js.map +1 -0
- package/src/executors/dev-server/schema.d.js +3 -0
- package/src/executors/dev-server/schema.d.js.map +1 -0
- package/src/executors/dev-server/schema.d.ts +5 -0
- package/src/executors/dev-server/schema.json +38 -0
- package/src/executors/preview-server/compat.d.ts +2 -0
- package/src/executors/preview-server/compat.js +12 -0
- package/src/executors/preview-server/compat.js.map +1 -0
- package/src/executors/preview-server/preview-server.impl.d.ts +7 -0
- package/src/executors/preview-server/preview-server.impl.js +176 -0
- package/src/executors/preview-server/preview-server.impl.js.map +1 -0
- package/src/executors/preview-server/schema.d.js +3 -0
- package/src/executors/preview-server/schema.d.js.map +1 -0
- package/src/executors/preview-server/schema.d.ts +5 -0
- package/src/executors/preview-server/schema.json +37 -0
- package/src/executors/test/compat.d.ts +2 -0
- package/src/executors/test/compat.js +12 -0
- package/src/executors/test/compat.js.map +1 -0
- package/src/executors/test/lib/nx-reporter.d.ts +14 -0
- package/src/executors/test/lib/nx-reporter.js +40 -0
- package/src/executors/test/lib/nx-reporter.js.map +1 -0
- package/src/executors/test/lib/utils.d.ts +4 -0
- package/src/executors/test/lib/utils.js +77 -0
- package/src/executors/test/lib/utils.js.map +1 -0
- package/src/executors/test/schema.d.js +3 -0
- package/src/executors/test/schema.d.js.map +1 -0
- package/src/executors/test/schema.d.ts +7 -0
- package/src/executors/test/schema.json +36 -0
- package/src/executors/test/vitest.impl.d.ts +6 -0
- package/src/executors/test/vitest.impl.js +67 -0
- package/src/executors/test/vitest.impl.js.map +1 -0
- package/src/generators/configuration/configuration.d.ts +5 -0
- package/src/generators/configuration/configuration.js +147 -0
- package/src/generators/configuration/configuration.js.map +1 -0
- package/src/generators/configuration/lib/convert-non-vite.d.ts +5 -0
- package/src/generators/configuration/lib/convert-non-vite.js +62 -0
- package/src/generators/configuration/lib/convert-non-vite.js.map +1 -0
- package/src/generators/configuration/schema.d.js +3 -0
- package/src/generators/configuration/schema.d.js.map +1 -0
- package/src/generators/configuration/schema.d.ts +12 -0
- package/src/generators/configuration/schema.json +61 -0
- package/src/generators/init/init.d.ts +6 -0
- package/src/generators/init/init.js +82 -0
- package/src/generators/init/init.js.map +1 -0
- package/src/generators/init/lib/utils.d.ts +6 -0
- package/src/generators/init/lib/utils.js +80 -0
- package/src/generators/init/lib/utils.js.map +1 -0
- package/src/generators/init/schema.d.js +3 -0
- package/src/generators/init/schema.d.js.map +1 -0
- package/src/generators/init/schema.d.ts +7 -0
- package/src/generators/init/schema.json +31 -0
- package/src/generators/vitest/files/tsconfig.spec.json__tmpl__ +20 -0
- package/src/generators/vitest/schema.d.js +3 -0
- package/src/generators/vitest/schema.d.js.map +1 -0
- package/src/generators/vitest/schema.d.ts +11 -0
- package/src/generators/vitest/schema.json +56 -0
- package/src/generators/vitest/vitest-generator.d.ts +5 -0
- package/src/generators/vitest/vitest-generator.js +187 -0
- package/src/generators/vitest/vitest-generator.js.map +1 -0
- package/src/migrations/update-15-3-1/update-vite-tsconfig-paths.d.ts +3 -0
- package/src/migrations/update-15-3-1/update-vite-tsconfig-paths.js +67 -0
- package/src/migrations/update-15-3-1/update-vite-tsconfig-paths.js.map +1 -0
- package/src/migrations/update-15-3-4/set-mode-in-configuration.d.ts +3 -0
- package/src/migrations/update-15-3-4/set-mode-in-configuration.js +37 -0
- package/src/migrations/update-15-3-4/set-mode-in-configuration.js.map +1 -0
- package/src/migrations/update-15-4-3/update-report-directory.d.ts +3 -0
- package/src/migrations/update-15-4-3/update-report-directory.js +39 -0
- package/src/migrations/update-15-4-3/update-report-directory.js.map +1 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.d.ts +2 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +15 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js.map +1 -0
- package/src/migrations/update-16-4-1-update-test-file-config/update-16-4-1-test-file-config.d.ts +2 -0
- package/src/migrations/update-16-4-1-update-test-file-config/update-16-4-1-test-file-config.js +35 -0
- package/src/migrations/update-16-4-1-update-test-file-config/update-16-4-1-test-file-config.js.map +1 -0
- package/src/migrations/update-16-6-0-change-ts-paths-plugin/change-ts-paths-plugin.d.ts +2 -0
- package/src/migrations/update-16-6-0-change-ts-paths-plugin/change-ts-paths-plugin.js +39 -0
- package/src/migrations/update-16-6-0-change-ts-paths-plugin/change-ts-paths-plugin.js.map +1 -0
- package/src/migrations/update-17-1-0/move-target-defaults.d.ts +2 -0
- package/src/migrations/update-17-1-0/move-target-defaults.js +77 -0
- package/src/migrations/update-17-1-0/move-target-defaults.js.map +1 -0
- package/src/migrations/update-17-2-0/lib/add-file-replacements.d.ts +2 -0
- package/src/migrations/update-17-2-0/lib/add-file-replacements.js +67 -0
- package/src/migrations/update-17-2-0/lib/add-file-replacements.js.map +1 -0
- package/src/migrations/update-17-2-0/lib/edit-build-config.d.ts +2 -0
- package/src/migrations/update-17-2-0/lib/edit-build-config.js +121 -0
- package/src/migrations/update-17-2-0/lib/edit-build-config.js.map +1 -0
- package/src/migrations/update-17-2-0/lib/edit-test-config.d.ts +2 -0
- package/src/migrations/update-17-2-0/lib/edit-test-config.js +83 -0
- package/src/migrations/update-17-2-0/lib/edit-test-config.js.map +1 -0
- package/src/migrations/update-17-2-0/update-vite-config.d.ts +5 -0
- package/src/migrations/update-17-2-0/update-vite-config.js +68 -0
- package/src/migrations/update-17-2-0/update-vite-config.js.map +1 -0
- package/src/migrations/update-17-3-0/lib/fix-coverage-and-reporters.d.ts +3 -0
- package/src/migrations/update-17-3-0/lib/fix-coverage-and-reporters.js +117 -0
- package/src/migrations/update-17-3-0/lib/fix-coverage-and-reporters.js.map +1 -0
- package/src/migrations/update-17-3-0/vitest-coverage-and-reporters.d.ts +2 -0
- package/src/migrations/update-17-3-0/vitest-coverage-and-reporters.js +45 -0
- package/src/migrations/update-17-3-0/vitest-coverage-and-reporters.js.map +1 -0
- package/src/plugins/plugin.d.ts +10 -0
- package/src/plugins/plugin.js +223 -0
- package/src/plugins/plugin.js.map +1 -0
- package/src/utils/ensure-dependencies.d.ts +8 -0
- package/src/utils/ensure-dependencies.js +34 -0
- package/src/utils/ensure-dependencies.js.map +1 -0
- package/src/utils/executor-utils.d.ts +11 -0
- package/src/utils/executor-utils.js +59 -0
- package/src/utils/executor-utils.js.map +1 -0
- package/src/utils/find-vite-config.d.ts +3 -0
- package/src/utils/find-vite-config.js +46 -0
- package/src/utils/find-vite-config.js.map +1 -0
- package/src/utils/generator-utils.d.ts +42 -0
- package/src/utils/generator-utils.js +527 -0
- package/src/utils/generator-utils.js.map +1 -0
- package/src/utils/options-utils.d.ts +17 -0
- package/src/utils/options-utils.js +100 -0
- package/src/utils/options-utils.js.map +1 -0
- package/src/utils/test-files/angular-project.config.json +89 -0
- package/src/utils/test-files/react-lib-non-buildable-jest.json +22 -0
- package/src/utils/test-files/react-lib-non-buildable-vitest.json +22 -0
- package/src/utils/test-files/react-mixed-project.config.json +47 -0
- package/src/utils/test-files/react-vite-project.config.json +54 -0
- package/src/utils/test-files/test-vite-configs.d.ts +31 -0
- package/src/utils/test-files/test-vite-configs.js +291 -0
- package/src/utils/test-files/test-vite-configs.js.map +1 -0
- package/src/utils/test-files/unknown-project.config.json +69 -0
- package/src/utils/test-utils.d.ts +9 -0
- package/src/utils/test-utils.js +522 -0
- package/src/utils/test-utils.js.map +1 -0
- package/src/utils/versions.d.ts +11 -0
- package/src/utils/versions.js +55 -0
- package/src/utils/versions.js.map +1 -0
- package/src/utils/vite-config-edit-utils.d.ts +3 -0
- package/src/utils/vite-config-edit-utils.js +314 -0
- package/src/utils/vite-config-edit-utils.js.map +1 -0
|
@@ -0,0 +1,522 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function _export(target, all) {
|
|
3
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
4
|
+
enumerable: true,
|
|
5
|
+
get: all[name]
|
|
6
|
+
});
|
|
7
|
+
}
|
|
8
|
+
_export(exports, {
|
|
9
|
+
mockViteReactAppGenerator: function() {
|
|
10
|
+
return mockViteReactAppGenerator;
|
|
11
|
+
},
|
|
12
|
+
mockReactAppGenerator: function() {
|
|
13
|
+
return mockReactAppGenerator;
|
|
14
|
+
},
|
|
15
|
+
mockReactMixedAppGenerator: function() {
|
|
16
|
+
return mockReactMixedAppGenerator;
|
|
17
|
+
},
|
|
18
|
+
mockWebAppGenerator: function() {
|
|
19
|
+
return mockWebAppGenerator;
|
|
20
|
+
},
|
|
21
|
+
mockAngularAppGenerator: function() {
|
|
22
|
+
return mockAngularAppGenerator;
|
|
23
|
+
},
|
|
24
|
+
mockUnknownAppGenerator: function() {
|
|
25
|
+
return mockUnknownAppGenerator;
|
|
26
|
+
},
|
|
27
|
+
mockReactLibNonBuildableJestTestRunnerGenerator: function() {
|
|
28
|
+
return mockReactLibNonBuildableJestTestRunnerGenerator;
|
|
29
|
+
},
|
|
30
|
+
mockReactLibNonBuildableVitestRunnerGenerator: function() {
|
|
31
|
+
return mockReactLibNonBuildableVitestRunnerGenerator;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
const _extends = require("@swc/helpers/_/_extends");
|
|
35
|
+
const _devkit = require("@nx/devkit");
|
|
36
|
+
const _reactviteprojectconfigjson = require("./test-files/react-vite-project.config.json");
|
|
37
|
+
const _angularprojectconfigjson = require("./test-files/angular-project.config.json");
|
|
38
|
+
const _unknownprojectconfigjson = require("./test-files/unknown-project.config.json");
|
|
39
|
+
const _reactmixedprojectconfigjson = require("./test-files/react-mixed-project.config.json");
|
|
40
|
+
const _reactlibnonbuildablejestjson = require("./test-files/react-lib-non-buildable-jest.json");
|
|
41
|
+
const _reactlibnonbuildablevitestjson = require("./test-files/react-lib-non-buildable-vitest.json");
|
|
42
|
+
function mockViteReactAppGenerator(tree) {
|
|
43
|
+
const appName = 'my-test-react-vite-app';
|
|
44
|
+
tree.write(`apps/${appName}/src/main.tsx`, `import ReactDOM from 'react-dom';\n`);
|
|
45
|
+
tree.write(`apps/${appName}/tsconfig.json`, `{
|
|
46
|
+
"compilerOptions": {
|
|
47
|
+
"jsx": "react-jsx",
|
|
48
|
+
"allowJs": false,
|
|
49
|
+
"esModuleInterop": false,
|
|
50
|
+
"allowSyntheticDefaultImports": true,
|
|
51
|
+
"strict": true,
|
|
52
|
+
"types": ["vite/client"]
|
|
53
|
+
},
|
|
54
|
+
"files": [],
|
|
55
|
+
"include": [],
|
|
56
|
+
"references": [
|
|
57
|
+
{
|
|
58
|
+
"path": "./tsconfig.app.json"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"path": "./tsconfig.spec.json"
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"extends": "../../tsconfig.base.json"
|
|
65
|
+
}
|
|
66
|
+
`);
|
|
67
|
+
tree.write(`apps/${appName}/tsconfig.app.json`, `{
|
|
68
|
+
"extends": "./tsconfig.json",
|
|
69
|
+
"compilerOptions": {
|
|
70
|
+
"outDir": "../../dist/out-tsc",
|
|
71
|
+
"types": ["node"]
|
|
72
|
+
},
|
|
73
|
+
"files": [
|
|
74
|
+
"../../node_modules/@nx/react/typings/cssmodule.d.ts",
|
|
75
|
+
"../../node_modules/@nx/react/typings/image.d.ts"
|
|
76
|
+
],
|
|
77
|
+
"exclude": [
|
|
78
|
+
"src/**/*.spec.ts",
|
|
79
|
+
"src/**/*.test.ts",
|
|
80
|
+
"src/**/*.spec.tsx",
|
|
81
|
+
"src/**/*.test.tsx",
|
|
82
|
+
"src/**/*.spec.js",
|
|
83
|
+
"src/**/*.test.js",
|
|
84
|
+
"src/**/*.spec.jsx",
|
|
85
|
+
"src/**/*.test.jsx"
|
|
86
|
+
],
|
|
87
|
+
"include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx"]
|
|
88
|
+
}
|
|
89
|
+
`);
|
|
90
|
+
tree.write(`apps/${appName}/index.html`, `<!DOCTYPE html>
|
|
91
|
+
<html lang="en">
|
|
92
|
+
<head>
|
|
93
|
+
<meta charset="utf-8" />
|
|
94
|
+
<title>Rv1</title>
|
|
95
|
+
<base href="/" />
|
|
96
|
+
|
|
97
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
98
|
+
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
|
|
99
|
+
<link rel="stylesheet" href="/src/styles.css" />
|
|
100
|
+
</head>
|
|
101
|
+
<body>
|
|
102
|
+
<div id="root"></div>
|
|
103
|
+
<script type="module" src="/src/main.tsx"></script>
|
|
104
|
+
</body>
|
|
105
|
+
</html>`);
|
|
106
|
+
tree.write(`apps/${appName}/vite.config.ts`, ` /// <reference types="vitest" />
|
|
107
|
+
import { defineConfig } from 'vite';
|
|
108
|
+
import react from '@vitejs/plugin-react';
|
|
109
|
+
import tsconfigPaths from 'vite-tsconfig-paths';
|
|
110
|
+
|
|
111
|
+
export default defineConfig({
|
|
112
|
+
server: {
|
|
113
|
+
port: 4200,
|
|
114
|
+
host: 'localhost',
|
|
115
|
+
},
|
|
116
|
+
plugins: [
|
|
117
|
+
react(),
|
|
118
|
+
tsconfigPaths({
|
|
119
|
+
root: '../../',
|
|
120
|
+
projects: ['tsconfig.base.json'],
|
|
121
|
+
}),
|
|
122
|
+
],
|
|
123
|
+
|
|
124
|
+
test: {
|
|
125
|
+
globals: true,
|
|
126
|
+
cache: {
|
|
127
|
+
dir: '../../node_modules/.vitest',
|
|
128
|
+
},
|
|
129
|
+
environment: 'jsdom',
|
|
130
|
+
include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
|
|
131
|
+
},
|
|
132
|
+
});
|
|
133
|
+
`);
|
|
134
|
+
(0, _devkit.writeJson)(tree, 'workspace.json', {
|
|
135
|
+
projects: {
|
|
136
|
+
'my-test-react-vite-app': _extends._({}, _reactviteprojectconfigjson, {
|
|
137
|
+
root: `apps/${appName}`,
|
|
138
|
+
projectType: 'application'
|
|
139
|
+
})
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
(0, _devkit.writeJson)(tree, `apps/${appName}/project.json`, _extends._({}, _reactviteprojectconfigjson, {
|
|
143
|
+
root: `apps/${appName}`,
|
|
144
|
+
projectType: 'application'
|
|
145
|
+
}));
|
|
146
|
+
return tree;
|
|
147
|
+
}
|
|
148
|
+
function mockReactAppGenerator(tree, userAppName) {
|
|
149
|
+
const appName = userAppName != null ? userAppName : 'my-test-react-app';
|
|
150
|
+
tree.write(`apps/${appName}/src/main.tsx`, `import ReactDOM from 'react-dom';\n`);
|
|
151
|
+
tree.write(`apps/${appName}/webpack.config.ts`, ``);
|
|
152
|
+
tree.write(`apps/${appName}/tsconfig.json`, `{
|
|
153
|
+
"extends": "../../tsconfig.base.json",
|
|
154
|
+
"compilerOptions": {
|
|
155
|
+
"jsx": "react-jsx",
|
|
156
|
+
"allowJs": true,
|
|
157
|
+
"esModuleInterop": true,
|
|
158
|
+
"allowSyntheticDefaultImports": true,
|
|
159
|
+
"forceConsistentCasingInFileNames": true,
|
|
160
|
+
"strict": true,
|
|
161
|
+
"noImplicitOverride": true,
|
|
162
|
+
"noPropertyAccessFromIndexSignature": true,
|
|
163
|
+
"noImplicitReturns": true,
|
|
164
|
+
"noFallthroughCasesInSwitch": true
|
|
165
|
+
},
|
|
166
|
+
"files": [],
|
|
167
|
+
"include": [],
|
|
168
|
+
"references": [
|
|
169
|
+
{
|
|
170
|
+
"path": "./tsconfig.app.json"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"path": "./tsconfig.spec.json"
|
|
174
|
+
}
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
`);
|
|
178
|
+
tree.write(`apps/${appName}/tsconfig.app.json`, `{
|
|
179
|
+
"extends": "./tsconfig.json",
|
|
180
|
+
"compilerOptions": {
|
|
181
|
+
"outDir": "../../dist/out-tsc"
|
|
182
|
+
},
|
|
183
|
+
"files": [
|
|
184
|
+
"../../node_modules/@nx/react/typings/cssmodule.d.ts",
|
|
185
|
+
"../../node_modules/@nx/react/typings/image.d.ts"
|
|
186
|
+
],
|
|
187
|
+
"exclude": [
|
|
188
|
+
"jest.config.ts",
|
|
189
|
+
"**/*.spec.ts",
|
|
190
|
+
"**/*.test.ts",
|
|
191
|
+
"**/*.spec.tsx",
|
|
192
|
+
"**/*.test.tsx",
|
|
193
|
+
"**/*.spec.js",
|
|
194
|
+
"**/*.test.js",
|
|
195
|
+
"**/*.spec.jsx",
|
|
196
|
+
"**/*.test.jsx"
|
|
197
|
+
],
|
|
198
|
+
"include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"]
|
|
199
|
+
}
|
|
200
|
+
`);
|
|
201
|
+
tree.write(`apps/${appName}/src/index.html`, `<!DOCTYPE html>
|
|
202
|
+
<html lang="en">
|
|
203
|
+
<head>
|
|
204
|
+
<meta charset="utf-8" />
|
|
205
|
+
<title>My Test React App</title>
|
|
206
|
+
<base href="/" />
|
|
207
|
+
|
|
208
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
209
|
+
<link rel="icon" type="image/x-icon" href="favicon.ico" />
|
|
210
|
+
</head>
|
|
211
|
+
<body>
|
|
212
|
+
<div id="root"></div>
|
|
213
|
+
</body>
|
|
214
|
+
</html>`);
|
|
215
|
+
(0, _devkit.writeJson)(tree, `apps/${appName}/project.json`, {
|
|
216
|
+
root: `apps/${appName}`,
|
|
217
|
+
projectType: 'application'
|
|
218
|
+
});
|
|
219
|
+
return tree;
|
|
220
|
+
}
|
|
221
|
+
function mockReactMixedAppGenerator(tree) {
|
|
222
|
+
const appName = 'my-test-mixed-react-app';
|
|
223
|
+
tree.write(`apps/${appName}/src/main.tsx`, `import ReactDOM from 'react-dom';\n`);
|
|
224
|
+
tree.write(`apps/${appName}/tsconfig.json`, `{
|
|
225
|
+
"extends": "../../tsconfig.base.json",
|
|
226
|
+
"compilerOptions": {
|
|
227
|
+
"jsx": "react-jsx",
|
|
228
|
+
"allowJs": true,
|
|
229
|
+
"esModuleInterop": true,
|
|
230
|
+
"allowSyntheticDefaultImports": true,
|
|
231
|
+
"forceConsistentCasingInFileNames": true,
|
|
232
|
+
"strict": true,
|
|
233
|
+
"noImplicitOverride": true,
|
|
234
|
+
"noPropertyAccessFromIndexSignature": true,
|
|
235
|
+
"noImplicitReturns": true,
|
|
236
|
+
"noFallthroughCasesInSwitch": true
|
|
237
|
+
},
|
|
238
|
+
"files": [],
|
|
239
|
+
"include": [],
|
|
240
|
+
"references": [
|
|
241
|
+
{
|
|
242
|
+
"path": "./tsconfig.app.json"
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"path": "./tsconfig.spec.json"
|
|
246
|
+
}
|
|
247
|
+
]
|
|
248
|
+
}
|
|
249
|
+
`);
|
|
250
|
+
tree.write(`apps/${appName}/tsconfig.app.json`, `{
|
|
251
|
+
"extends": "./tsconfig.json",
|
|
252
|
+
"compilerOptions": {
|
|
253
|
+
"outDir": "../../dist/out-tsc"
|
|
254
|
+
},
|
|
255
|
+
"files": [
|
|
256
|
+
"../../node_modules/@nx/react/typings/cssmodule.d.ts",
|
|
257
|
+
"../../node_modules/@nx/react/typings/image.d.ts"
|
|
258
|
+
],
|
|
259
|
+
"exclude": [
|
|
260
|
+
"jest.config.ts",
|
|
261
|
+
"**/*.spec.ts",
|
|
262
|
+
"**/*.test.ts",
|
|
263
|
+
"**/*.spec.tsx",
|
|
264
|
+
"**/*.test.tsx",
|
|
265
|
+
"**/*.spec.js",
|
|
266
|
+
"**/*.test.js",
|
|
267
|
+
"**/*.spec.jsx",
|
|
268
|
+
"**/*.test.jsx"
|
|
269
|
+
],
|
|
270
|
+
"include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"]
|
|
271
|
+
}
|
|
272
|
+
`);
|
|
273
|
+
tree.write(`apps/${appName}/src/index.html`, `<!DOCTYPE html>
|
|
274
|
+
<html lang="en">
|
|
275
|
+
<head>
|
|
276
|
+
<meta charset="utf-8" />
|
|
277
|
+
<title>My Test React App</title>
|
|
278
|
+
<base href="/" />
|
|
279
|
+
|
|
280
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
281
|
+
<link rel="icon" type="image/x-icon" href="favicon.ico" />
|
|
282
|
+
</head>
|
|
283
|
+
<body>
|
|
284
|
+
<div id="root"></div>
|
|
285
|
+
</body>
|
|
286
|
+
</html>`);
|
|
287
|
+
(0, _devkit.writeJson)(tree, 'workspace.json', {
|
|
288
|
+
projects: {
|
|
289
|
+
'my-test-mixed-react-app': _extends._({}, _reactmixedprojectconfigjson, {
|
|
290
|
+
root: `apps/${appName}`,
|
|
291
|
+
projectType: 'application'
|
|
292
|
+
})
|
|
293
|
+
}
|
|
294
|
+
});
|
|
295
|
+
(0, _devkit.writeJson)(tree, `apps/${appName}/project.json`, _extends._({}, _reactmixedprojectconfigjson, {
|
|
296
|
+
root: `apps/${appName}`,
|
|
297
|
+
projectType: 'application'
|
|
298
|
+
}));
|
|
299
|
+
return tree;
|
|
300
|
+
}
|
|
301
|
+
function mockWebAppGenerator(tree) {
|
|
302
|
+
const appName = 'my-test-web-app';
|
|
303
|
+
tree.write(`apps/${appName}/src/main.ts`, `import './app/app.element.ts';`);
|
|
304
|
+
tree.write(`apps/${appName}/tsconfig.json`, `{
|
|
305
|
+
"extends": "../../tsconfig.base.json",
|
|
306
|
+
"files": [],
|
|
307
|
+
"include": [],
|
|
308
|
+
"references": [
|
|
309
|
+
{
|
|
310
|
+
"path": "./tsconfig.app.json"
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"path": "./tsconfig.spec.json"
|
|
314
|
+
}
|
|
315
|
+
]
|
|
316
|
+
}
|
|
317
|
+
`);
|
|
318
|
+
tree.write(`apps/${appName}/webpack.config.ts`, ``);
|
|
319
|
+
tree.write(`apps/${appName}/src/index.html`, `<!DOCTYPE html>
|
|
320
|
+
<html lang="en">
|
|
321
|
+
<head>
|
|
322
|
+
<meta charset="utf-8" />
|
|
323
|
+
<title>WebappPure</title>
|
|
324
|
+
<base href="/" />
|
|
325
|
+
|
|
326
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
327
|
+
<link rel="icon" type="image/x-icon" href="favicon.ico" />
|
|
328
|
+
</head>
|
|
329
|
+
<body>
|
|
330
|
+
<workspace-root></workspace-root>
|
|
331
|
+
</body>
|
|
332
|
+
</html>
|
|
333
|
+
`);
|
|
334
|
+
(0, _devkit.writeJson)(tree, 'workspace.json', {
|
|
335
|
+
projects: {
|
|
336
|
+
'my-test-web-app': {
|
|
337
|
+
root: `apps/${appName}`,
|
|
338
|
+
projectType: 'application'
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
});
|
|
342
|
+
(0, _devkit.writeJson)(tree, `apps/${appName}/project.json`, {
|
|
343
|
+
root: `apps/${appName}`,
|
|
344
|
+
projectType: 'application'
|
|
345
|
+
});
|
|
346
|
+
return tree;
|
|
347
|
+
}
|
|
348
|
+
function mockAngularAppGenerator(tree) {
|
|
349
|
+
const appName = 'my-test-angular-app';
|
|
350
|
+
(0, _devkit.writeJson)(tree, 'workspace.json', {
|
|
351
|
+
projects: {
|
|
352
|
+
'my-test-angular-app': _extends._({}, _angularprojectconfigjson, {
|
|
353
|
+
root: `apps/${appName}`,
|
|
354
|
+
projectType: 'application'
|
|
355
|
+
})
|
|
356
|
+
}
|
|
357
|
+
});
|
|
358
|
+
(0, _devkit.writeJson)(tree, `apps/${appName}/project.json`, _extends._({}, _angularprojectconfigjson, {
|
|
359
|
+
root: `apps/${appName}`,
|
|
360
|
+
projectType: 'application'
|
|
361
|
+
}));
|
|
362
|
+
return tree;
|
|
363
|
+
}
|
|
364
|
+
function mockUnknownAppGenerator(tree) {
|
|
365
|
+
const appName = 'my-test-random-app';
|
|
366
|
+
(0, _devkit.writeJson)(tree, 'workspace.json', {
|
|
367
|
+
projects: {
|
|
368
|
+
'my-test-random-app': _extends._({}, _unknownprojectconfigjson, {
|
|
369
|
+
root: `apps/${appName}`,
|
|
370
|
+
projectType: 'application'
|
|
371
|
+
})
|
|
372
|
+
}
|
|
373
|
+
});
|
|
374
|
+
(0, _devkit.writeJson)(tree, `apps/${appName}/project.json`, _extends._({}, _unknownprojectconfigjson, {
|
|
375
|
+
root: `apps/${appName}`,
|
|
376
|
+
projectType: 'application'
|
|
377
|
+
}));
|
|
378
|
+
return tree;
|
|
379
|
+
}
|
|
380
|
+
function mockReactLibNonBuildableJestTestRunnerGenerator(tree) {
|
|
381
|
+
const libName = 'react-lib-nonb-jest';
|
|
382
|
+
tree.write(`libs/${libName}/src/index.ts`, ``);
|
|
383
|
+
tree.write(`libs/${libName}/tsconfig.json`, `{
|
|
384
|
+
"compilerOptions": {
|
|
385
|
+
"jsx": "react-jsx",
|
|
386
|
+
"allowJs": false,
|
|
387
|
+
"esModuleInterop": false,
|
|
388
|
+
"allowSyntheticDefaultImports": true,
|
|
389
|
+
"strict": true
|
|
390
|
+
},
|
|
391
|
+
"files": [],
|
|
392
|
+
"include": [],
|
|
393
|
+
"references": [
|
|
394
|
+
{
|
|
395
|
+
"path": "./tsconfig.lib.json"
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
"path": "./tsconfig.spec.json"
|
|
399
|
+
}
|
|
400
|
+
],
|
|
401
|
+
"extends": "../../tsconfig.base.json"
|
|
402
|
+
}`);
|
|
403
|
+
tree.write(`libs/${libName}/tsconfig.lib.json`, `{
|
|
404
|
+
"extends": "./tsconfig.json",
|
|
405
|
+
"compilerOptions": {
|
|
406
|
+
"outDir": "../../dist/out-tsc",
|
|
407
|
+
"types": ["node"]
|
|
408
|
+
},
|
|
409
|
+
"files": [
|
|
410
|
+
"../../node_modules/@nx/react/typings/cssmodule.d.ts",
|
|
411
|
+
"../../node_modules/@nx/react/typings/image.d.ts"
|
|
412
|
+
],
|
|
413
|
+
"exclude": [
|
|
414
|
+
"jest.config.ts",
|
|
415
|
+
"src/**/*.spec.ts",
|
|
416
|
+
"src/**/*.test.ts",
|
|
417
|
+
"src/**/*.spec.tsx",
|
|
418
|
+
"src/**/*.test.tsx",
|
|
419
|
+
"src/**/*.spec.js",
|
|
420
|
+
"src/**/*.test.js",
|
|
421
|
+
"src/**/*.spec.jsx",
|
|
422
|
+
"src/**/*.test.jsx"
|
|
423
|
+
],
|
|
424
|
+
"include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx"]
|
|
425
|
+
}`);
|
|
426
|
+
(0, _devkit.writeJson)(tree, 'workspace.json', {
|
|
427
|
+
projects: {
|
|
428
|
+
[`${libName}`]: _extends._({}, _reactlibnonbuildablejestjson, {
|
|
429
|
+
root: `libs/${libName}`,
|
|
430
|
+
projectType: 'library'
|
|
431
|
+
})
|
|
432
|
+
}
|
|
433
|
+
});
|
|
434
|
+
(0, _devkit.writeJson)(tree, `libs/${libName}/project.json`, _extends._({}, _reactlibnonbuildablejestjson, {
|
|
435
|
+
root: `libs/${libName}`,
|
|
436
|
+
projectType: 'library'
|
|
437
|
+
}));
|
|
438
|
+
return tree;
|
|
439
|
+
}
|
|
440
|
+
function mockReactLibNonBuildableVitestRunnerGenerator(tree) {
|
|
441
|
+
const libName = 'react-lib-nonb-vitest';
|
|
442
|
+
tree.write(`libs/${libName}/src/index.ts`, ``);
|
|
443
|
+
tree.write(`libs/${libName}/vite.config.ts`, `/// <reference types="vitest" />
|
|
444
|
+
import { defineConfig } from 'vite';
|
|
445
|
+
import react from '@vitejs/plugin-react';
|
|
446
|
+
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
|
|
447
|
+
|
|
448
|
+
export default defineConfig({
|
|
449
|
+
|
|
450
|
+
plugins: [
|
|
451
|
+
nxViteTsPaths(),
|
|
452
|
+
react(),
|
|
453
|
+
],
|
|
454
|
+
|
|
455
|
+
test: {
|
|
456
|
+
globals: true,
|
|
457
|
+
cache: {
|
|
458
|
+
dir: '../../node_modules/.vitest',
|
|
459
|
+
},
|
|
460
|
+
environment: 'jsdom',
|
|
461
|
+
include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
|
|
462
|
+
},
|
|
463
|
+
});
|
|
464
|
+
`);
|
|
465
|
+
tree.write(`libs/${libName}/tsconfig.json`, `{
|
|
466
|
+
"compilerOptions": {
|
|
467
|
+
"jsx": "react-jsx",
|
|
468
|
+
"allowJs": false,
|
|
469
|
+
"esModuleInterop": false,
|
|
470
|
+
"allowSyntheticDefaultImports": true,
|
|
471
|
+
"strict": true
|
|
472
|
+
},
|
|
473
|
+
"files": [],
|
|
474
|
+
"include": [],
|
|
475
|
+
"references": [
|
|
476
|
+
{
|
|
477
|
+
"path": "./tsconfig.lib.json"
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
"path": "./tsconfig.spec.json"
|
|
481
|
+
}
|
|
482
|
+
],
|
|
483
|
+
"extends": "../../tsconfig.base.json"
|
|
484
|
+
}`);
|
|
485
|
+
tree.write(`libs/${libName}/tsconfig.lib.json`, `{
|
|
486
|
+
"extends": "./tsconfig.json",
|
|
487
|
+
"compilerOptions": {
|
|
488
|
+
"outDir": "../../dist/out-tsc",
|
|
489
|
+
"types": ["node"]
|
|
490
|
+
},
|
|
491
|
+
"files": [
|
|
492
|
+
"../../node_modules/@nx/react/typings/cssmodule.d.ts",
|
|
493
|
+
"../../node_modules/@nx/react/typings/image.d.ts"
|
|
494
|
+
],
|
|
495
|
+
"exclude": [
|
|
496
|
+
"**/*.spec.ts",
|
|
497
|
+
"**/*.test.ts",
|
|
498
|
+
"**/*.spec.tsx",
|
|
499
|
+
"**/*.test.tsx",
|
|
500
|
+
"**/*.spec.js",
|
|
501
|
+
"**/*.test.js",
|
|
502
|
+
"**/*.spec.jsx",
|
|
503
|
+
"**/*.test.jsx"
|
|
504
|
+
],
|
|
505
|
+
"include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"]
|
|
506
|
+
}`);
|
|
507
|
+
(0, _devkit.writeJson)(tree, 'workspace.json', {
|
|
508
|
+
projects: {
|
|
509
|
+
[`${libName}`]: _extends._({}, _reactlibnonbuildablevitestjson, {
|
|
510
|
+
root: `libs/${libName}`,
|
|
511
|
+
projectType: 'library'
|
|
512
|
+
})
|
|
513
|
+
}
|
|
514
|
+
});
|
|
515
|
+
(0, _devkit.writeJson)(tree, `libs/${libName}/project.json`, _extends._({}, _reactlibnonbuildablevitestjson, {
|
|
516
|
+
root: `libs/${libName}`,
|
|
517
|
+
projectType: 'library'
|
|
518
|
+
}));
|
|
519
|
+
return tree;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
//# sourceMappingURL=test-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../packages/vite/src/utils/test-utils.ts"],"sourcesContent":["import { Tree, writeJson } from '@nx/devkit';\nimport * as reactViteConfig from './test-files/react-vite-project.config.json';\nimport * as angularAppConfig from './test-files/angular-project.config.json';\nimport * as randomAppConfig from './test-files/unknown-project.config.json';\nimport * as mixedAppConfig from './test-files/react-mixed-project.config.json';\nimport * as reactLibNBJest from './test-files/react-lib-non-buildable-jest.json';\nimport * as reactLibNBVitest from './test-files/react-lib-non-buildable-vitest.json';\n\nexport function mockViteReactAppGenerator(tree: Tree): Tree {\n const appName = 'my-test-react-vite-app';\n\n tree.write(\n `apps/${appName}/src/main.tsx`,\n `import ReactDOM from 'react-dom';\\n`\n );\n\n tree.write(\n `apps/${appName}/tsconfig.json`,\n `{\n \"compilerOptions\": {\n \"jsx\": \"react-jsx\",\n \"allowJs\": false,\n \"esModuleInterop\": false,\n \"allowSyntheticDefaultImports\": true,\n \"strict\": true,\n \"types\": [\"vite/client\"]\n },\n \"files\": [],\n \"include\": [],\n \"references\": [\n {\n \"path\": \"./tsconfig.app.json\"\n },\n {\n \"path\": \"./tsconfig.spec.json\"\n }\n ],\n \"extends\": \"../../tsconfig.base.json\"\n }\n `\n );\n tree.write(\n `apps/${appName}/tsconfig.app.json`,\n `{\n \"extends\": \"./tsconfig.json\",\n \"compilerOptions\": {\n \"outDir\": \"../../dist/out-tsc\",\n \"types\": [\"node\"]\n },\n \"files\": [\n \"../../node_modules/@nx/react/typings/cssmodule.d.ts\",\n \"../../node_modules/@nx/react/typings/image.d.ts\"\n ],\n \"exclude\": [\n \"src/**/*.spec.ts\",\n \"src/**/*.test.ts\",\n \"src/**/*.spec.tsx\",\n \"src/**/*.test.tsx\",\n \"src/**/*.spec.js\",\n \"src/**/*.test.js\",\n \"src/**/*.spec.jsx\",\n \"src/**/*.test.jsx\"\n ],\n \"include\": [\"src/**/*.js\", \"src/**/*.jsx\", \"src/**/*.ts\", \"src/**/*.tsx\"]\n } \n `\n );\n\n tree.write(\n `apps/${appName}/index.html`,\n `<!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <meta charset=\"utf-8\" />\n <title>Rv1</title>\n <base href=\"/\" />\n \n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n <link rel=\"icon\" type=\"image/x-icon\" href=\"/favicon.ico\" />\n <link rel=\"stylesheet\" href=\"/src/styles.css\" />\n </head>\n <body>\n <div id=\"root\"></div>\n <script type=\"module\" src=\"/src/main.tsx\"></script>\n </body>\n </html>`\n );\n\n tree.write(\n `apps/${appName}/vite.config.ts`,\n ` /// <reference types=\"vitest\" />\n import { defineConfig } from 'vite';\n import react from '@vitejs/plugin-react';\n import tsconfigPaths from 'vite-tsconfig-paths';\n \n export default defineConfig({\n server: {\n port: 4200,\n host: 'localhost',\n },\n plugins: [\n react(),\n tsconfigPaths({\n root: '../../',\n projects: ['tsconfig.base.json'],\n }),\n ],\n \n test: {\n globals: true,\n cache: {\n dir: '../../node_modules/.vitest',\n },\n environment: 'jsdom',\n include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],\n },\n });\n `\n );\n\n writeJson(tree, 'workspace.json', {\n projects: {\n 'my-test-react-vite-app': {\n ...reactViteConfig,\n root: `apps/${appName}`,\n projectType: 'application',\n },\n },\n });\n\n writeJson(tree, `apps/${appName}/project.json`, {\n ...reactViteConfig,\n root: `apps/${appName}`,\n projectType: 'application',\n });\n\n return tree;\n}\n\nexport function mockReactAppGenerator(tree: Tree, userAppName?: string): Tree {\n const appName = userAppName ?? 'my-test-react-app';\n\n tree.write(\n `apps/${appName}/src/main.tsx`,\n `import ReactDOM from 'react-dom';\\n`\n );\n\n tree.write(`apps/${appName}/webpack.config.ts`, ``);\n\n tree.write(\n `apps/${appName}/tsconfig.json`,\n `{\n \"extends\": \"../../tsconfig.base.json\",\n \"compilerOptions\": {\n \"jsx\": \"react-jsx\",\n \"allowJs\": true,\n \"esModuleInterop\": true,\n \"allowSyntheticDefaultImports\": true,\n \"forceConsistentCasingInFileNames\": true,\n \"strict\": true,\n \"noImplicitOverride\": true,\n \"noPropertyAccessFromIndexSignature\": true,\n \"noImplicitReturns\": true,\n \"noFallthroughCasesInSwitch\": true\n },\n \"files\": [],\n \"include\": [],\n \"references\": [\n {\n \"path\": \"./tsconfig.app.json\"\n },\n {\n \"path\": \"./tsconfig.spec.json\"\n }\n ]\n }\n `\n );\n tree.write(\n `apps/${appName}/tsconfig.app.json`,\n `{\n \"extends\": \"./tsconfig.json\",\n \"compilerOptions\": {\n \"outDir\": \"../../dist/out-tsc\"\n },\n \"files\": [\n \"../../node_modules/@nx/react/typings/cssmodule.d.ts\",\n \"../../node_modules/@nx/react/typings/image.d.ts\"\n ],\n \"exclude\": [\n \"jest.config.ts\",\n \"**/*.spec.ts\",\n \"**/*.test.ts\",\n \"**/*.spec.tsx\",\n \"**/*.test.tsx\",\n \"**/*.spec.js\",\n \"**/*.test.js\",\n \"**/*.spec.jsx\",\n \"**/*.test.jsx\"\n ],\n \"include\": [\"**/*.js\", \"**/*.jsx\", \"**/*.ts\", \"**/*.tsx\"]\n } \n `\n );\n\n tree.write(\n `apps/${appName}/src/index.html`,\n `<!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <meta charset=\"utf-8\" />\n <title>My Test React App</title>\n <base href=\"/\" />\n \n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n <link rel=\"icon\" type=\"image/x-icon\" href=\"favicon.ico\" />\n </head>\n <body>\n <div id=\"root\"></div>\n </body>\n </html>`\n );\n\n writeJson(tree, `apps/${appName}/project.json`, {\n root: `apps/${appName}`,\n projectType: 'application',\n });\n\n return tree;\n}\nexport function mockReactMixedAppGenerator(tree: Tree): Tree {\n const appName = 'my-test-mixed-react-app';\n\n tree.write(\n `apps/${appName}/src/main.tsx`,\n `import ReactDOM from 'react-dom';\\n`\n );\n\n tree.write(\n `apps/${appName}/tsconfig.json`,\n `{\n \"extends\": \"../../tsconfig.base.json\",\n \"compilerOptions\": {\n \"jsx\": \"react-jsx\",\n \"allowJs\": true,\n \"esModuleInterop\": true,\n \"allowSyntheticDefaultImports\": true,\n \"forceConsistentCasingInFileNames\": true,\n \"strict\": true,\n \"noImplicitOverride\": true,\n \"noPropertyAccessFromIndexSignature\": true,\n \"noImplicitReturns\": true,\n \"noFallthroughCasesInSwitch\": true\n },\n \"files\": [],\n \"include\": [],\n \"references\": [\n {\n \"path\": \"./tsconfig.app.json\"\n },\n {\n \"path\": \"./tsconfig.spec.json\"\n }\n ]\n }\n `\n );\n tree.write(\n `apps/${appName}/tsconfig.app.json`,\n `{\n \"extends\": \"./tsconfig.json\",\n \"compilerOptions\": {\n \"outDir\": \"../../dist/out-tsc\"\n },\n \"files\": [\n \"../../node_modules/@nx/react/typings/cssmodule.d.ts\",\n \"../../node_modules/@nx/react/typings/image.d.ts\"\n ],\n \"exclude\": [\n \"jest.config.ts\",\n \"**/*.spec.ts\",\n \"**/*.test.ts\",\n \"**/*.spec.tsx\",\n \"**/*.test.tsx\",\n \"**/*.spec.js\",\n \"**/*.test.js\",\n \"**/*.spec.jsx\",\n \"**/*.test.jsx\"\n ],\n \"include\": [\"**/*.js\", \"**/*.jsx\", \"**/*.ts\", \"**/*.tsx\"]\n } \n `\n );\n\n tree.write(\n `apps/${appName}/src/index.html`,\n `<!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <meta charset=\"utf-8\" />\n <title>My Test React App</title>\n <base href=\"/\" />\n \n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n <link rel=\"icon\" type=\"image/x-icon\" href=\"favicon.ico\" />\n </head>\n <body>\n <div id=\"root\"></div>\n </body>\n </html>`\n );\n\n writeJson(tree, 'workspace.json', {\n projects: {\n 'my-test-mixed-react-app': {\n ...mixedAppConfig,\n root: `apps/${appName}`,\n projectType: 'application',\n },\n },\n });\n\n writeJson(tree, `apps/${appName}/project.json`, {\n ...mixedAppConfig,\n root: `apps/${appName}`,\n projectType: 'application',\n });\n\n return tree;\n}\n\nexport function mockWebAppGenerator(tree: Tree): Tree {\n const appName = 'my-test-web-app';\n\n tree.write(`apps/${appName}/src/main.ts`, `import './app/app.element.ts';`);\n\n tree.write(\n `apps/${appName}/tsconfig.json`,\n `{\n \"extends\": \"../../tsconfig.base.json\",\n \"files\": [],\n \"include\": [],\n \"references\": [\n {\n \"path\": \"./tsconfig.app.json\"\n },\n {\n \"path\": \"./tsconfig.spec.json\"\n }\n ]\n } \n `\n );\n\n tree.write(`apps/${appName}/webpack.config.ts`, ``);\n\n tree.write(\n `apps/${appName}/src/index.html`,\n `<!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <meta charset=\"utf-8\" />\n <title>WebappPure</title>\n <base href=\"/\" />\n \n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n <link rel=\"icon\" type=\"image/x-icon\" href=\"favicon.ico\" />\n </head>\n <body>\n <workspace-root></workspace-root>\n </body>\n </html>\n `\n );\n\n writeJson(tree, 'workspace.json', {\n projects: {\n 'my-test-web-app': {\n root: `apps/${appName}`,\n projectType: 'application',\n },\n },\n });\n\n writeJson(tree, `apps/${appName}/project.json`, {\n root: `apps/${appName}`,\n projectType: 'application',\n });\n return tree;\n}\n\nexport function mockAngularAppGenerator(tree: Tree): Tree {\n const appName = 'my-test-angular-app';\n\n writeJson(tree, 'workspace.json', {\n projects: {\n 'my-test-angular-app': {\n ...angularAppConfig,\n root: `apps/${appName}`,\n projectType: 'application',\n },\n },\n });\n\n writeJson(tree, `apps/${appName}/project.json`, {\n ...angularAppConfig,\n root: `apps/${appName}`,\n projectType: 'application',\n });\n\n return tree;\n}\n\nexport function mockUnknownAppGenerator(tree: Tree): Tree {\n const appName = 'my-test-random-app';\n\n writeJson(tree, 'workspace.json', {\n projects: {\n 'my-test-random-app': {\n ...randomAppConfig,\n root: `apps/${appName}`,\n projectType: 'application',\n },\n },\n });\n\n writeJson(tree, `apps/${appName}/project.json`, {\n ...randomAppConfig,\n root: `apps/${appName}`,\n projectType: 'application',\n });\n\n return tree;\n}\n\nexport function mockReactLibNonBuildableJestTestRunnerGenerator(\n tree: Tree\n): Tree {\n const libName = 'react-lib-nonb-jest';\n\n tree.write(`libs/${libName}/src/index.ts`, ``);\n\n tree.write(\n `libs/${libName}/tsconfig.json`,\n `{\n \"compilerOptions\": {\n \"jsx\": \"react-jsx\",\n \"allowJs\": false,\n \"esModuleInterop\": false,\n \"allowSyntheticDefaultImports\": true,\n \"strict\": true\n },\n \"files\": [],\n \"include\": [],\n \"references\": [\n {\n \"path\": \"./tsconfig.lib.json\"\n },\n {\n \"path\": \"./tsconfig.spec.json\"\n }\n ],\n \"extends\": \"../../tsconfig.base.json\"\n }`\n );\n tree.write(\n `libs/${libName}/tsconfig.lib.json`,\n `{\n \"extends\": \"./tsconfig.json\",\n \"compilerOptions\": {\n \"outDir\": \"../../dist/out-tsc\",\n \"types\": [\"node\"]\n },\n \"files\": [\n \"../../node_modules/@nx/react/typings/cssmodule.d.ts\",\n \"../../node_modules/@nx/react/typings/image.d.ts\"\n ],\n \"exclude\": [\n \"jest.config.ts\",\n \"src/**/*.spec.ts\",\n \"src/**/*.test.ts\",\n \"src/**/*.spec.tsx\",\n \"src/**/*.test.tsx\",\n \"src/**/*.spec.js\",\n \"src/**/*.test.js\",\n \"src/**/*.spec.jsx\",\n \"src/**/*.test.jsx\"\n ],\n \"include\": [\"src/**/*.js\", \"src/**/*.jsx\", \"src/**/*.ts\", \"src/**/*.tsx\"]\n }`\n );\n\n writeJson(tree, 'workspace.json', {\n projects: {\n [`${libName}`]: {\n ...reactLibNBJest,\n root: `libs/${libName}`,\n projectType: 'library',\n },\n },\n });\n\n writeJson(tree, `libs/${libName}/project.json`, {\n ...reactLibNBJest,\n root: `libs/${libName}`,\n projectType: 'library',\n });\n\n return tree;\n}\n\nexport function mockReactLibNonBuildableVitestRunnerGenerator(\n tree: Tree\n): Tree {\n const libName = 'react-lib-nonb-vitest';\n\n tree.write(`libs/${libName}/src/index.ts`, ``);\n\n tree.write(\n `libs/${libName}/vite.config.ts`,\n `/// <reference types=\"vitest\" />\n import { defineConfig } from 'vite';\n import react from '@vitejs/plugin-react';\n import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';\n\n export default defineConfig({\n\n plugins: [\n nxViteTsPaths(),\n react(),\n ],\n\n test: {\n globals: true,\n cache: {\n dir: '../../node_modules/.vitest',\n },\n environment: 'jsdom',\n include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],\n },\n });\n `\n );\n\n tree.write(\n `libs/${libName}/tsconfig.json`,\n `{\n \"compilerOptions\": {\n \"jsx\": \"react-jsx\",\n \"allowJs\": false,\n \"esModuleInterop\": false,\n \"allowSyntheticDefaultImports\": true,\n \"strict\": true\n },\n \"files\": [],\n \"include\": [],\n \"references\": [\n {\n \"path\": \"./tsconfig.lib.json\"\n },\n {\n \"path\": \"./tsconfig.spec.json\"\n }\n ],\n \"extends\": \"../../tsconfig.base.json\"\n }`\n );\n tree.write(\n `libs/${libName}/tsconfig.lib.json`,\n `{\n \"extends\": \"./tsconfig.json\",\n \"compilerOptions\": {\n \"outDir\": \"../../dist/out-tsc\",\n \"types\": [\"node\"]\n },\n \"files\": [\n \"../../node_modules/@nx/react/typings/cssmodule.d.ts\",\n \"../../node_modules/@nx/react/typings/image.d.ts\"\n ],\n \"exclude\": [\n \"**/*.spec.ts\",\n \"**/*.test.ts\",\n \"**/*.spec.tsx\",\n \"**/*.test.tsx\",\n \"**/*.spec.js\",\n \"**/*.test.js\",\n \"**/*.spec.jsx\",\n \"**/*.test.jsx\"\n ],\n \"include\": [\"**/*.js\", \"**/*.jsx\", \"**/*.ts\", \"**/*.tsx\"]\n }`\n );\n\n writeJson(tree, 'workspace.json', {\n projects: {\n [`${libName}`]: {\n ...reactLibNBVitest,\n root: `libs/${libName}`,\n projectType: 'library',\n },\n },\n });\n\n writeJson(tree, `libs/${libName}/project.json`, {\n ...reactLibNBVitest,\n root: `libs/${libName}`,\n projectType: 'library',\n });\n\n return tree;\n}\n"],"names":["mockViteReactAppGenerator","mockReactAppGenerator","mockReactMixedAppGenerator","mockWebAppGenerator","mockAngularAppGenerator","mockUnknownAppGenerator","mockReactLibNonBuildableJestTestRunnerGenerator","mockReactLibNonBuildableVitestRunnerGenerator","tree","appName","write","writeJson","projects","reactViteConfig","root","projectType","userAppName","mixedAppConfig","angularAppConfig","randomAppConfig","libName","reactLibNBJest","reactLibNBVitest"],"mappings":";;;;;;;;IAQgBA,yBAAyB;eAAzBA;;IAmIAC,qBAAqB;eAArBA;;IA2FAC,0BAA0B;eAA1BA;;IAqGAC,mBAAmB;eAAnBA;;IA4DAC,uBAAuB;eAAvBA;;IAsBAC,uBAAuB;eAAvBA;;IAsBAC,+CAA+C;eAA/CA;;IA4EAC,6CAA6C;eAA7CA;;;;wBA/fgB;4CACC;0CACC;0CACD;6CACD;8CACA;gDACE;AAE3B,SAASP,0BAA0BQ,IAAU;IAClD,MAAMC,UAAU;IAEhBD,KAAKE,KAAK,CACR,CAAC,KAAK,EAAED,QAAQ,aAAa,CAAC,EAC9B,CAAC,mCAAmC,CAAC;IAGvCD,KAAKE,KAAK,CACR,CAAC,KAAK,EAAED,QAAQ,cAAc,CAAC,EAC/B,CAAC;;;;;;;;;;;;;;;;;;;;;MAqBC,CAAC;IAELD,KAAKE,KAAK,CACR,CAAC,KAAK,EAAED,QAAQ,kBAAkB,CAAC,EACnC,CAAC;;;;;;;;;;;;;;;;;;;;;;MAsBC,CAAC;IAGLD,KAAKE,KAAK,CACR,CAAC,KAAK,EAAED,QAAQ,WAAW,CAAC,EAC5B,CAAC;;;;;;;;;;;;;;;WAeM,CAAC;IAGVD,KAAKE,KAAK,CACR,CAAC,KAAK,EAAED,QAAQ,eAAe,CAAC,EAChC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;IA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+
export declare const viteVersion = "~5.0.0";
|
|
3
|
+
export declare const vitestVersion = "^1.3.1";
|
|
4
|
+
export declare const vitePluginReactVersion = "^4.2.0";
|
|
5
|
+
export declare const vitePluginReactSwcVersion = "^3.5.0";
|
|
6
|
+
export declare const jsdomVersion = "~22.1.0";
|
|
7
|
+
export declare const vitePluginDtsVersion = "~2.3.0";
|
|
8
|
+
export declare const happyDomVersion = "~9.20.3";
|
|
9
|
+
export declare const edgeRuntimeVmVersion = "~3.0.2";
|
|
10
|
+
export declare const vitestCoverageV8Version = "^1.0.4";
|
|
11
|
+
export declare const vitestCoverageIstanbulVersion = "^1.0.4";
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function _export(target, all) {
|
|
3
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
4
|
+
enumerable: true,
|
|
5
|
+
get: all[name]
|
|
6
|
+
});
|
|
7
|
+
}
|
|
8
|
+
_export(exports, {
|
|
9
|
+
nxVersion: function() {
|
|
10
|
+
return nxVersion;
|
|
11
|
+
},
|
|
12
|
+
viteVersion: function() {
|
|
13
|
+
return viteVersion;
|
|
14
|
+
},
|
|
15
|
+
vitestVersion: function() {
|
|
16
|
+
return vitestVersion;
|
|
17
|
+
},
|
|
18
|
+
vitePluginReactVersion: function() {
|
|
19
|
+
return vitePluginReactVersion;
|
|
20
|
+
},
|
|
21
|
+
vitePluginReactSwcVersion: function() {
|
|
22
|
+
return vitePluginReactSwcVersion;
|
|
23
|
+
},
|
|
24
|
+
jsdomVersion: function() {
|
|
25
|
+
return jsdomVersion;
|
|
26
|
+
},
|
|
27
|
+
vitePluginDtsVersion: function() {
|
|
28
|
+
return vitePluginDtsVersion;
|
|
29
|
+
},
|
|
30
|
+
happyDomVersion: function() {
|
|
31
|
+
return happyDomVersion;
|
|
32
|
+
},
|
|
33
|
+
edgeRuntimeVmVersion: function() {
|
|
34
|
+
return edgeRuntimeVmVersion;
|
|
35
|
+
},
|
|
36
|
+
vitestCoverageV8Version: function() {
|
|
37
|
+
return vitestCoverageV8Version;
|
|
38
|
+
},
|
|
39
|
+
vitestCoverageIstanbulVersion: function() {
|
|
40
|
+
return vitestCoverageIstanbulVersion;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
const nxVersion = require('../../package.json').version;
|
|
44
|
+
const viteVersion = '~5.0.0';
|
|
45
|
+
const vitestVersion = '^1.3.1';
|
|
46
|
+
const vitePluginReactVersion = '^4.2.0';
|
|
47
|
+
const vitePluginReactSwcVersion = '^3.5.0';
|
|
48
|
+
const jsdomVersion = '~22.1.0';
|
|
49
|
+
const vitePluginDtsVersion = '~2.3.0';
|
|
50
|
+
const happyDomVersion = '~9.20.3';
|
|
51
|
+
const edgeRuntimeVmVersion = '~3.0.2';
|
|
52
|
+
const vitestCoverageV8Version = '^1.0.4';
|
|
53
|
+
const vitestCoverageIstanbulVersion = '^1.0.4';
|
|
54
|
+
|
|
55
|
+
//# sourceMappingURL=versions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../packages/vite/src/utils/versions.ts"],"sourcesContent":["export const nxVersion = require('../../package.json').version;\nexport const viteVersion = '~5.0.0';\nexport const vitestVersion = '^1.3.1';\nexport const vitePluginReactVersion = '^4.2.0';\nexport const vitePluginReactSwcVersion = '^3.5.0';\nexport const jsdomVersion = '~22.1.0';\nexport const vitePluginDtsVersion = '~2.3.0';\nexport const happyDomVersion = '~9.20.3';\nexport const edgeRuntimeVmVersion = '~3.0.2';\n\n// Coverage providers\nexport const vitestCoverageV8Version = '^1.0.4';\nexport const vitestCoverageIstanbulVersion = '^1.0.4';\n"],"names":["nxVersion","viteVersion","vitestVersion","vitePluginReactVersion","vitePluginReactSwcVersion","jsdomVersion","vitePluginDtsVersion","happyDomVersion","edgeRuntimeVmVersion","vitestCoverageV8Version","vitestCoverageIstanbulVersion","require","version"],"mappings":";;;;;;;;IAAaA,SAAS;eAATA;;IACAC,WAAW;eAAXA;;IACAC,aAAa;eAAbA;;IACAC,sBAAsB;eAAtBA;;IACAC,yBAAyB;eAAzBA;;IACAC,YAAY;eAAZA;;IACAC,oBAAoB;eAApBA;;IACAC,eAAe;eAAfA;;IACAC,oBAAoB;eAApBA;;IAGAC,uBAAuB;eAAvBA;;IACAC,6BAA6B;eAA7BA;;;AAZN,MAAMV,YAAYW,QAAQ,sBAAsBC,OAAO;AACvD,MAAMX,cAAc;AACpB,MAAMC,gBAAgB;AACtB,MAAMC,yBAAyB;AAC/B,MAAMC,4BAA4B;AAClC,MAAMC,eAAe;AACrB,MAAMC,uBAAuB;AAC7B,MAAMC,kBAAkB;AACxB,MAAMC,uBAAuB;AAG7B,MAAMC,0BAA0B;AAChC,MAAMC,gCAAgC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Tree } from '@nx/devkit';
|
|
2
|
+
import { TargetFlags } from './generator-utils';
|
|
3
|
+
export declare function ensureViteConfigIsCorrect(tree: Tree, path: string, buildConfigString: string, buildConfigObject: {}, imports: string[], plugins: string[], testConfigString: string, testConfigObject: {}, cacheDir: string, projectAlreadyHasViteTargets?: TargetFlags): boolean;
|