@nx/nuxt 17.3.0-beta.3 → 17.3.0-beta.5
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/application.js +8 -0
- package/src/generators/application/lib/ensure-dependencies.d.ts +3 -0
- package/src/generators/application/lib/ensure-dependencies.js +27 -0
- package/src/generators/init/init.js +4 -12
- package/src/generators/init/lib/utils.js +2 -19
- package/src/generators/init/schema.d.ts +1 -3
- package/src/generators/init/schema.json +0 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/nuxt",
|
|
3
|
-
"version": "17.3.0-beta.
|
|
3
|
+
"version": "17.3.0-beta.5",
|
|
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": {
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"tslib": "^2.3.0",
|
|
32
32
|
"@nuxt/kit": "^3.8.1",
|
|
33
|
-
"@nx/devkit": "17.3.0-beta.
|
|
34
|
-
"@nx/js": "17.3.0-beta.
|
|
35
|
-
"@nx/eslint": "17.3.0-beta.
|
|
36
|
-
"@nx/vue": "17.3.0-beta.
|
|
33
|
+
"@nx/devkit": "17.3.0-beta.5",
|
|
34
|
+
"@nx/js": "17.3.0-beta.5",
|
|
35
|
+
"@nx/eslint": "17.3.0-beta.5",
|
|
36
|
+
"@nx/vue": "17.3.0-beta.5"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {},
|
|
39
39
|
"publishConfig": {
|
|
@@ -12,15 +12,23 @@ const add_e2e_1 = require("./lib/add-e2e");
|
|
|
12
12
|
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
|
+
const ensure_dependencies_1 = require("./lib/ensure-dependencies");
|
|
15
16
|
async function applicationGenerator(tree, schema) {
|
|
16
17
|
const tasks = [];
|
|
17
18
|
const options = await (0, normalize_options_1.normalizeOptions)(tree, schema);
|
|
18
19
|
const projectOffsetFromRoot = (0, devkit_1.offsetFromRoot)(options.appProjectRoot);
|
|
20
|
+
const jsInitTask = await (0, js_1.initGenerator)(tree, {
|
|
21
|
+
...schema,
|
|
22
|
+
tsConfigName: schema.rootProject ? 'tsconfig.json' : 'tsconfig.base.json',
|
|
23
|
+
skipFormat: true,
|
|
24
|
+
});
|
|
25
|
+
tasks.push(jsInitTask);
|
|
19
26
|
const nuxtInitTask = await (0, init_1.default)(tree, {
|
|
20
27
|
...options,
|
|
21
28
|
skipFormat: true,
|
|
22
29
|
});
|
|
23
30
|
tasks.push(nuxtInitTask);
|
|
31
|
+
tasks.push((0, ensure_dependencies_1.ensureDependencies)(tree, options));
|
|
24
32
|
(0, devkit_1.addProjectConfiguration)(tree, options.name, {
|
|
25
33
|
root: options.appProjectRoot,
|
|
26
34
|
projectType: 'application',
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ensureDependencies = void 0;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const vue_1 = require("@nx/vue");
|
|
6
|
+
const versions_1 = require("../../../utils/versions");
|
|
7
|
+
function ensureDependencies(host, options) {
|
|
8
|
+
const devDependencies = {
|
|
9
|
+
'@nx/vite': versions_1.nxVersion,
|
|
10
|
+
'@nuxt/devtools': versions_1.nuxtDevtoolsVersion,
|
|
11
|
+
'@nuxt/kit': versions_1.nuxtVersion,
|
|
12
|
+
'@nuxt/ui-templates': versions_1.nuxtUiTemplatesVersion,
|
|
13
|
+
nuxt: versions_1.nuxtVersion,
|
|
14
|
+
h3: versions_1.h3Version,
|
|
15
|
+
vue: vue_1.vueVersion,
|
|
16
|
+
'vue-router': vue_1.vueRouterVersion,
|
|
17
|
+
'vue-tsc': vue_1.vueTscVersion,
|
|
18
|
+
};
|
|
19
|
+
if (options.style === 'scss') {
|
|
20
|
+
devDependencies['sass'] = vue_1.sassVersion;
|
|
21
|
+
}
|
|
22
|
+
else if (options.style === 'less') {
|
|
23
|
+
devDependencies['less'] = vue_1.lessVersion;
|
|
24
|
+
}
|
|
25
|
+
return (0, devkit_1.addDependenciesToPackageJson)(host, {}, devDependencies);
|
|
26
|
+
}
|
|
27
|
+
exports.ensureDependencies = ensureDependencies;
|
|
@@ -1,22 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.nuxtInitGenerator = void 0;
|
|
4
|
-
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const js_1 = require("@nx/js");
|
|
6
4
|
const utils_1 = require("./lib/utils");
|
|
7
5
|
async function nuxtInitGenerator(host, schema) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
...schema,
|
|
11
|
-
tsConfigName: schema.rootProject ? 'tsconfig.json' : 'tsconfig.base.json',
|
|
12
|
-
skipFormat: true,
|
|
13
|
-
}));
|
|
6
|
+
(0, utils_1.addPlugin)(host);
|
|
7
|
+
let installTask = () => { };
|
|
14
8
|
if (!schema.skipPackageJson) {
|
|
15
|
-
|
|
16
|
-
tasks.push(installTask);
|
|
9
|
+
installTask = (0, utils_1.updateDependencies)(host, schema);
|
|
17
10
|
}
|
|
18
|
-
|
|
19
|
-
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
11
|
+
return installTask;
|
|
20
12
|
}
|
|
21
13
|
exports.nuxtInitGenerator = nuxtInitGenerator;
|
|
22
14
|
exports.default = nuxtInitGenerator;
|
|
@@ -3,28 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.addPlugin = exports.addVitestTargetDefaults = exports.updateDependencies = void 0;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const versions_1 = require("../../../utils/versions");
|
|
6
|
-
const vue_1 = require("@nx/vue");
|
|
7
6
|
function updateDependencies(host, schema) {
|
|
8
|
-
|
|
7
|
+
return (0, devkit_1.addDependenciesToPackageJson)(host, {}, {
|
|
9
8
|
'@nx/nuxt': versions_1.nxVersion,
|
|
10
|
-
'@nx/vite': versions_1.nxVersion,
|
|
11
|
-
'@nuxt/devtools': versions_1.nuxtDevtoolsVersion,
|
|
12
|
-
'@nuxt/kit': versions_1.nuxtVersion,
|
|
13
|
-
'@nuxt/ui-templates': versions_1.nuxtUiTemplatesVersion,
|
|
14
9
|
nuxi: versions_1.nuxtVersion,
|
|
15
|
-
|
|
16
|
-
h3: versions_1.h3Version,
|
|
17
|
-
vue: vue_1.vueVersion,
|
|
18
|
-
'vue-router': vue_1.vueRouterVersion,
|
|
19
|
-
'vue-tsc': vue_1.vueTscVersion,
|
|
20
|
-
};
|
|
21
|
-
if (schema.style === 'scss') {
|
|
22
|
-
devDependencies['sass'] = vue_1.sassVersion;
|
|
23
|
-
}
|
|
24
|
-
else if (schema.style === 'less') {
|
|
25
|
-
devDependencies['less'] = vue_1.lessVersion;
|
|
26
|
-
}
|
|
27
|
-
return (0, devkit_1.addDependenciesToPackageJson)(host, {}, devDependencies);
|
|
10
|
+
});
|
|
28
11
|
}
|
|
29
12
|
exports.updateDependencies = updateDependencies;
|
|
30
13
|
function addVitestTargetDefaults(tree) {
|
|
@@ -11,20 +11,10 @@
|
|
|
11
11
|
"type": "boolean",
|
|
12
12
|
"default": false
|
|
13
13
|
},
|
|
14
|
-
"rootProject": {
|
|
15
|
-
"description": "Create a project at the root of the workspace",
|
|
16
|
-
"type": "boolean",
|
|
17
|
-
"default": false
|
|
18
|
-
},
|
|
19
14
|
"skipPackageJson": {
|
|
20
15
|
"description": "Do not add dependencies to `package.json`.",
|
|
21
16
|
"type": "boolean",
|
|
22
17
|
"default": false
|
|
23
|
-
},
|
|
24
|
-
"style": {
|
|
25
|
-
"description": "The file extension to be used for style files.",
|
|
26
|
-
"type": "string",
|
|
27
|
-
"default": "css"
|
|
28
18
|
}
|
|
29
19
|
},
|
|
30
20
|
"required": []
|