@nx/remix 17.3.0-rc.0 → 17.3.0
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/package.json +5 -5
- package/src/generators/application/__snapshots__/application.impl.spec.ts.snap +50 -283
- package/src/generators/application/application.impl.js +1 -1
- package/src/generators/application/files/common/app/nx-welcome.tsx__tmpl__ +867 -0
- package/src/generators/application/files/common/app/routes/_index.tsx__tmpl__ +5 -28
- package/src/generators/application/files/common/tests/routes/_index.spec.tsx__tmpl__ +1 -1
- package/src/generators/application/files/common/tsconfig.app.json__tmpl__ +20 -0
- package/src/generators/application/files/common/tsconfig.json__tmpl__ +20 -14
- package/src/generators/application/lib/update-unit-test-config.js +20 -0
|
@@ -1,32 +1,9 @@
|
|
|
1
|
+
import NxWelcome from "../nx-welcome";
|
|
2
|
+
|
|
1
3
|
export default function Index() {
|
|
2
4
|
return (
|
|
3
|
-
<div
|
|
4
|
-
<
|
|
5
|
-
<ul>
|
|
6
|
-
<li>
|
|
7
|
-
<a
|
|
8
|
-
target="_blank"
|
|
9
|
-
href="https://remix.run/tutorials/blog"
|
|
10
|
-
rel="noreferrer"
|
|
11
|
-
>
|
|
12
|
-
15m Quickstart Blog Tutorial
|
|
13
|
-
</a>
|
|
14
|
-
</li>
|
|
15
|
-
<li>
|
|
16
|
-
<a
|
|
17
|
-
target="_blank"
|
|
18
|
-
href="https://remix.run/tutorials/jokes"
|
|
19
|
-
rel="noreferrer"
|
|
20
|
-
>
|
|
21
|
-
Deep Dive Jokes App Tutorial
|
|
22
|
-
</a>
|
|
23
|
-
</li>
|
|
24
|
-
<li>
|
|
25
|
-
<a target="_blank" href="https://remix.run/docs" rel="noreferrer">
|
|
26
|
-
Remix Docs
|
|
27
|
-
</a>
|
|
28
|
-
</li>
|
|
29
|
-
</ul>
|
|
5
|
+
<div>
|
|
6
|
+
<NxWelcome title={"<%= projectName %>"} />
|
|
30
7
|
</div>
|
|
31
8
|
);
|
|
32
|
-
}
|
|
9
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig.json",
|
|
3
|
+
"include": [
|
|
4
|
+
"remix.env.d.ts",
|
|
5
|
+
"app/**/*.ts",
|
|
6
|
+
"app/**/*.tsx",
|
|
7
|
+
"app/**/*.js",
|
|
8
|
+
"app/**/*.jsx"
|
|
9
|
+
],
|
|
10
|
+
"exclude": [
|
|
11
|
+
"tests/**/*.spec.ts",
|
|
12
|
+
"tests/**/*.test.ts",
|
|
13
|
+
"tests/**/*.spec.tsx",
|
|
14
|
+
"tests/**/*.test.tsx",
|
|
15
|
+
"tests/**/*.spec.js",
|
|
16
|
+
"tests/**/*.test.js",
|
|
17
|
+
"tests/**/*.spec.jsx",
|
|
18
|
+
"tests/**/*.test.jsx"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"extends": "<%= offsetFromRoot %>tsconfig.base.json",
|
|
3
|
-
"include": ["remix.env.d.ts", "**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"],
|
|
4
3
|
"compilerOptions": {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
4
|
+
"lib": ["DOM", "DOM.Iterable", "ES2019"],
|
|
5
|
+
"isolatedModules": true,
|
|
6
|
+
"esModuleInterop": true,
|
|
7
|
+
"jsx": "react-jsx",
|
|
8
|
+
"moduleResolution": "node",
|
|
9
|
+
"resolveJsonModule": true,
|
|
10
|
+
"target": "ES2019",
|
|
11
|
+
"strict": true,
|
|
12
|
+
"allowJs": true,
|
|
13
|
+
"forceConsistentCasingInFileNames": true,
|
|
14
|
+
// Remix takes care of building everything in `remix build`.
|
|
15
|
+
"noEmit": true
|
|
16
|
+
},
|
|
17
|
+
"include": [],
|
|
18
|
+
"files": [],
|
|
19
|
+
"references": [
|
|
20
|
+
{
|
|
21
|
+
"path": "./tsconfig.app.json"
|
|
22
|
+
}
|
|
23
|
+
]
|
|
18
24
|
}
|
|
@@ -24,6 +24,26 @@ function updateUnitTestConfig(tree, pathToRoot, unitTestRunner) {
|
|
|
24
24
|
.read(pathToJestConfig, 'utf-8')
|
|
25
25
|
.replace('jest.preset.js', 'jest.preset.cjs'));
|
|
26
26
|
}
|
|
27
|
+
const pathToTsConfigSpec = (0, devkit_1.joinPathFragments)(pathToRoot, `tsconfig.spec.json`);
|
|
28
|
+
(0, devkit_1.updateJson)(tree, pathToTsConfigSpec, (json) => {
|
|
29
|
+
json.includes = [
|
|
30
|
+
'vite.config.ts',
|
|
31
|
+
'vitest.config.ts',
|
|
32
|
+
'app/**/*.ts',
|
|
33
|
+
'app/**/*.tsx',
|
|
34
|
+
'app/**/*.js',
|
|
35
|
+
'app/**/*.jsx',
|
|
36
|
+
'tests/**/*.spec.ts',
|
|
37
|
+
'tests/**/*.test.ts',
|
|
38
|
+
'tests/**/*.spec.tsx',
|
|
39
|
+
'tests/**/*.test.tsx',
|
|
40
|
+
'tests/**/*.spec.js',
|
|
41
|
+
'tests/**/*.test.js',
|
|
42
|
+
'tests/**/*.spec.jsx',
|
|
43
|
+
'tests/**/*.test.jsx',
|
|
44
|
+
];
|
|
45
|
+
return json;
|
|
46
|
+
});
|
|
27
47
|
return (0, devkit_1.addDependenciesToPackageJson)(tree, {}, {
|
|
28
48
|
'@testing-library/jest-dom': versions_1.testingLibraryJestDomVersion,
|
|
29
49
|
'@testing-library/react': versions_1.testingLibraryReactVersion,
|