@nx/nuxt 18.0.0-beta.0 → 18.0.0-beta.2
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 +6 -6
- package/src/generators/application/application.js +4 -0
- package/src/generators/application/files/src/components/NxWelcome.vue__tmpl__ +19 -0
- package/src/generators/application/lib/add-e2e.js +2 -0
- package/src/generators/application/lib/add-vitest.js +1 -0
- package/src/generators/application/schema.json +3 -3
- package/src/generators/init/lib/utils.js +1 -1
- package/src/generators/init/schema.json +1 -1
- package/src/generators/storybook-configuration/configuration.js +1 -0
- package/src/generators/storybook-configuration/schema.json +1 -1
- package/src/plugins/plugin.js +3 -3
- package/src/utils/add-linting.js +1 -0
- package/src/utils/versions.d.ts +1 -1
- package/src/utils/versions.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/nuxt",
|
|
3
|
-
"version": "18.0.0-beta.
|
|
3
|
+
"version": "18.0.0-beta.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Nuxt plugin for Nx contains executors and generators for managing Nuxt applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Vitest, Cypress, and Storybook.\n\n- Generators for applications, libraries, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
|
|
6
6
|
"repository": {
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"tslib": "^2.3.0",
|
|
32
|
-
"@nuxt/kit": "^3.
|
|
33
|
-
"@nx/devkit": "18.0.0-beta.
|
|
34
|
-
"@nx/js": "18.0.0-beta.
|
|
35
|
-
"@nx/eslint": "18.0.0-beta.
|
|
36
|
-
"@nx/vue": "18.0.0-beta.
|
|
32
|
+
"@nuxt/kit": "^3.10.0",
|
|
33
|
+
"@nx/devkit": "18.0.0-beta.2",
|
|
34
|
+
"@nx/js": "18.0.0-beta.2",
|
|
35
|
+
"@nx/eslint": "18.0.0-beta.2",
|
|
36
|
+
"@nx/vue": "18.0.0-beta.2"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {},
|
|
39
39
|
"publishConfig": {
|
|
@@ -13,6 +13,7 @@ const add_linting_1 = require("../../utils/add-linting");
|
|
|
13
13
|
const add_vitest_1 = require("./lib/add-vitest");
|
|
14
14
|
const vue_1 = require("@nx/vue");
|
|
15
15
|
const ensure_dependencies_1 = require("./lib/ensure-dependencies");
|
|
16
|
+
const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
|
|
16
17
|
async function applicationGenerator(tree, schema) {
|
|
17
18
|
const tasks = [];
|
|
18
19
|
const options = await (0, normalize_options_1.normalizeOptions)(tree, schema);
|
|
@@ -75,6 +76,9 @@ async function applicationGenerator(tree, schema) {
|
|
|
75
76
|
(0, devkit_1.toJS)(tree);
|
|
76
77
|
if (!options.skipFormat)
|
|
77
78
|
await (0, devkit_1.formatFiles)(tree);
|
|
79
|
+
tasks.push(() => {
|
|
80
|
+
(0, log_show_project_command_1.logShowProjectCommand)(options.projectName);
|
|
81
|
+
});
|
|
78
82
|
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
79
83
|
}
|
|
80
84
|
exports.applicationGenerator = applicationGenerator;
|
|
@@ -384,6 +384,25 @@ defineProps<{
|
|
|
384
384
|
nx g @nx/vue:component ui/src/lib/button
|
|
385
385
|
</pre>
|
|
386
386
|
</details>
|
|
387
|
+
<details>
|
|
388
|
+
<summary>
|
|
389
|
+
<svg
|
|
390
|
+
fill="none"
|
|
391
|
+
stroke="currentColor"
|
|
392
|
+
viewBox="0 0 24 24"
|
|
393
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
394
|
+
>
|
|
395
|
+
<path
|
|
396
|
+
strokeLinecap="round"
|
|
397
|
+
strokeLinejoin="round"
|
|
398
|
+
strokeWidth="2"
|
|
399
|
+
d="M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"
|
|
400
|
+
/>
|
|
401
|
+
</svg>
|
|
402
|
+
View project details
|
|
403
|
+
</summary>
|
|
404
|
+
<pre>nx show project {{ title }} --web</pre>
|
|
405
|
+
</details>
|
|
387
406
|
<details>
|
|
388
407
|
<summary>
|
|
389
408
|
<svg
|
|
@@ -23,6 +23,7 @@ async function addE2e(host, options) {
|
|
|
23
23
|
devServerTarget: `${options.projectName}:serve`,
|
|
24
24
|
baseUrl: 'http://localhost:4200',
|
|
25
25
|
jsx: true,
|
|
26
|
+
addPlugin: true,
|
|
26
27
|
});
|
|
27
28
|
}
|
|
28
29
|
else if (options.e2eTestRunner === 'playwright') {
|
|
@@ -43,6 +44,7 @@ async function addE2e(host, options) {
|
|
|
43
44
|
setParserOptionsProject: options.setParserOptionsProject,
|
|
44
45
|
webServerAddress: 'http://localhost:4200',
|
|
45
46
|
webServerCommand: `${(0, devkit_1.getPackageManagerCommand)().exec} nx serve ${options.projectName}`,
|
|
47
|
+
addPlugin: true,
|
|
46
48
|
});
|
|
47
49
|
}
|
|
48
50
|
return () => { };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
3
|
"cli": "nx",
|
|
4
4
|
"$id": "NxNuxtApp",
|
|
5
5
|
"title": "Create a Nuxt Application for Nx",
|
|
@@ -89,11 +89,11 @@
|
|
|
89
89
|
{ "value": "css", "label": "CSS" },
|
|
90
90
|
{
|
|
91
91
|
"value": "scss",
|
|
92
|
-
"label": "SASS(.scss) [
|
|
92
|
+
"label": "SASS(.scss) [ https://sass-lang.com ]"
|
|
93
93
|
},
|
|
94
94
|
{
|
|
95
95
|
"value": "less",
|
|
96
|
-
"label": "LESS [
|
|
96
|
+
"label": "LESS [ https://lesscss.org ]"
|
|
97
97
|
},
|
|
98
98
|
{ "value": "none", "label": "None" }
|
|
99
99
|
]
|
|
@@ -6,7 +6,7 @@ const versions_1 = require("../../../utils/versions");
|
|
|
6
6
|
function updateDependencies(host, schema) {
|
|
7
7
|
return (0, devkit_1.addDependenciesToPackageJson)(host, {}, {
|
|
8
8
|
'@nx/nuxt': versions_1.nxVersion,
|
|
9
|
-
|
|
9
|
+
nuxt: versions_1.nuxtVersion,
|
|
10
10
|
}, undefined, schema.keepExistingVersions);
|
|
11
11
|
}
|
|
12
12
|
exports.updateDependencies = updateDependencies;
|
|
@@ -10,6 +10,7 @@ const vue_1 = require("@nx/vue");
|
|
|
10
10
|
async function storybookConfigurationGenerator(host, options) {
|
|
11
11
|
const storybookConfigurationGenerator = await (0, vue_1.storybookConfigurationGenerator)(host, {
|
|
12
12
|
...options,
|
|
13
|
+
addPlugin: true,
|
|
13
14
|
});
|
|
14
15
|
const projectConfiguration = (0, devkit_1.readProjectConfiguration)(host, options.project);
|
|
15
16
|
const storybookConfigFolder = projectConfiguration.targets?.storybook?.options?.configDir;
|
package/src/plugins/plugin.js
CHANGED
|
@@ -62,7 +62,7 @@ async function buildNuxtTargets(configFilePath, projectRoot, options, context) {
|
|
|
62
62
|
}
|
|
63
63
|
function buildTarget(buildTargetName, namedInputs, buildOutputs, projectRoot) {
|
|
64
64
|
return {
|
|
65
|
-
command: `
|
|
65
|
+
command: `nuxt build`,
|
|
66
66
|
options: { cwd: projectRoot },
|
|
67
67
|
cache: true,
|
|
68
68
|
dependsOn: [`^${buildTargetName}`],
|
|
@@ -71,7 +71,7 @@ function buildTarget(buildTargetName, namedInputs, buildOutputs, projectRoot) {
|
|
|
71
71
|
? ['production', '^production']
|
|
72
72
|
: ['default', '^default']),
|
|
73
73
|
{
|
|
74
|
-
externalDependencies: ['
|
|
74
|
+
externalDependencies: ['nuxt'],
|
|
75
75
|
},
|
|
76
76
|
],
|
|
77
77
|
outputs: buildOutputs,
|
|
@@ -79,7 +79,7 @@ function buildTarget(buildTargetName, namedInputs, buildOutputs, projectRoot) {
|
|
|
79
79
|
}
|
|
80
80
|
function serveTarget(projectRoot) {
|
|
81
81
|
const targetConfig = {
|
|
82
|
-
command: `
|
|
82
|
+
command: `nuxt dev`,
|
|
83
83
|
options: {
|
|
84
84
|
cwd: projectRoot,
|
|
85
85
|
},
|
package/src/utils/add-linting.js
CHANGED
|
@@ -16,6 +16,7 @@ async function addLinting(host, options) {
|
|
|
16
16
|
unitTestRunner: options.unitTestRunner,
|
|
17
17
|
skipFormat: true,
|
|
18
18
|
rootProject: options.rootProject,
|
|
19
|
+
addPlugin: true,
|
|
19
20
|
});
|
|
20
21
|
tasks.push(lintTask);
|
|
21
22
|
(0, devkit_1.updateJson)(host, (0, path_1.joinPathFragments)(options.projectRoot, '.eslintrc.json'), lint_1.extendNuxtEslintJson);
|
package/src/utils/versions.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const nxVersion: any;
|
|
2
2
|
export declare const h3Version = "^1.8.2";
|
|
3
|
-
export declare const nuxtVersion = "^3.
|
|
3
|
+
export declare const nuxtVersion = "^3.10.0";
|
|
4
4
|
export declare const nuxtDevtoolsVersion = "1.0.0";
|
|
5
5
|
export declare const nuxtUiTemplatesVersion = "^1.3.1";
|
|
6
6
|
export declare const nuxtEslintConfigVersion = "0.2.0";
|
package/src/utils/versions.js
CHANGED
|
@@ -4,7 +4,7 @@ exports.nuxtEslintConfigVersion = exports.nuxtUiTemplatesVersion = exports.nuxtD
|
|
|
4
4
|
exports.nxVersion = require('../../package.json').version;
|
|
5
5
|
// nuxt deps
|
|
6
6
|
exports.h3Version = '^1.8.2';
|
|
7
|
-
exports.nuxtVersion = '^3.
|
|
7
|
+
exports.nuxtVersion = '^3.10.0';
|
|
8
8
|
exports.nuxtDevtoolsVersion = '1.0.0';
|
|
9
9
|
exports.nuxtUiTemplatesVersion = '^1.3.1';
|
|
10
10
|
// linting deps
|