@nx/vue 18.0.0-beta.1 → 18.0.0-beta.3

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/generators.json CHANGED
@@ -10,13 +10,13 @@
10
10
  "hidden": true
11
11
  },
12
12
  "application": {
13
- "factory": "./src/generators/application/application",
13
+ "factory": "./src/generators/application/application#applicationGeneratorInternal",
14
14
  "schema": "./src/generators/application/schema.json",
15
15
  "aliases": ["app"],
16
16
  "description": "Create a Vue application."
17
17
  },
18
18
  "library": {
19
- "factory": "./src/generators/library/library",
19
+ "factory": "./src/generators/library/library#libraryGeneratorInternal",
20
20
  "schema": "./src/generators/library/schema.json",
21
21
  "aliases": ["lib"],
22
22
  "x-type": "library",
@@ -35,7 +35,7 @@
35
35
  "description": "Set up Tailwind configuration for a project."
36
36
  },
37
37
  "storybook-configuration": {
38
- "factory": "./src/generators/storybook-configuration/configuration",
38
+ "factory": "./src/generators/storybook-configuration/configuration#storybookConfigurationGeneratorInternal",
39
39
  "schema": "./src/generators/storybook-configuration/schema.json",
40
40
  "description": "Set up storybook for a Vue app or library.",
41
41
  "hidden": false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/vue",
3
- "version": "18.0.0-beta.1",
3
+ "version": "18.0.0-beta.3",
4
4
  "private": false,
5
5
  "description": "The Vue plugin for Nx contains executors and generators for managing Vue 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,11 +30,11 @@
30
30
  "dependencies": {
31
31
  "minimatch": "9.0.3",
32
32
  "tslib": "^2.3.0",
33
- "@nx/devkit": "18.0.0-beta.1",
34
- "@nx/js": "18.0.0-beta.1",
35
- "@nx/eslint": "18.0.0-beta.1",
36
- "@nx/vite": "18.0.0-beta.1",
37
- "@nx/web": "18.0.0-beta.1"
33
+ "@nx/devkit": "18.0.0-beta.3",
34
+ "@nx/js": "18.0.0-beta.3",
35
+ "@nx/eslint": "18.0.0-beta.3",
36
+ "@nx/vite": "18.0.0-beta.3",
37
+ "@nx/web": "18.0.0-beta.3"
38
38
  },
39
39
  "publishConfig": {
40
40
  "access": "public"
@@ -1,4 +1,5 @@
1
1
  import { GeneratorCallback, Tree } from '@nx/devkit';
2
2
  import { Schema } from './schema';
3
- export declare function applicationGenerator(tree: Tree, _options: Schema): Promise<GeneratorCallback>;
3
+ export declare function applicationGenerator(tree: Tree, options: Schema): Promise<GeneratorCallback>;
4
+ export declare function applicationGeneratorInternal(tree: Tree, _options: Schema): Promise<GeneratorCallback>;
4
5
  export default applicationGenerator;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.applicationGenerator = void 0;
3
+ exports.applicationGeneratorInternal = exports.applicationGenerator = void 0;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const eslint_1 = require("@nx/eslint");
6
6
  const js_1 = require("@nx/js");
@@ -13,7 +13,11 @@ const add_vite_1 = require("./lib/add-vite");
13
13
  const create_ts_config_1 = require("../../utils/create-ts-config");
14
14
  const ensure_dependencies_1 = require("../../utils/ensure-dependencies");
15
15
  const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
16
- async function applicationGenerator(tree, _options) {
16
+ function applicationGenerator(tree, options) {
17
+ return applicationGeneratorInternal(tree, { addPlugin: false, ...options });
18
+ }
19
+ exports.applicationGenerator = applicationGenerator;
20
+ async function applicationGeneratorInternal(tree, _options) {
17
21
  const options = await (0, normalize_options_1.normalizeOptions)(tree, _options);
18
22
  const tasks = [];
19
23
  (0, devkit_1.addProjectConfiguration)(tree, options.name, {
@@ -48,6 +52,7 @@ async function applicationGenerator(tree, _options) {
48
52
  skipPackageJson: options.skipPackageJson,
49
53
  setParserOptionsProject: options.setParserOptionsProject,
50
54
  rootProject: options.rootProject,
55
+ addPlugin: options.addPlugin,
51
56
  }, 'app'));
52
57
  tasks.push(await (0, add_vite_1.addVite)(tree, options));
53
58
  tasks.push(await (0, add_e2e_1.addE2e)(tree, options));
@@ -60,5 +65,5 @@ async function applicationGenerator(tree, _options) {
60
65
  });
61
66
  return (0, devkit_1.runTasksInSerial)(...tasks);
62
67
  }
63
- exports.applicationGenerator = applicationGenerator;
68
+ exports.applicationGeneratorInternal = applicationGeneratorInternal;
64
69
  exports.default = applicationGenerator;
@@ -377,6 +377,25 @@ defineProps<{
377
377
  nx g @nx/vue:component ui/src/lib/button
378
378
  </pre>
379
379
  </details>
380
+ <details>
381
+ <summary>
382
+ <svg
383
+ fill="none"
384
+ stroke="currentColor"
385
+ viewBox="0 0 24 24"
386
+ xmlns="http://www.w3.org/2000/svg"
387
+ >
388
+ <path
389
+ strokeLinecap="round"
390
+ strokeLinejoin="round"
391
+ strokeWidth="2"
392
+ 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"
393
+ />
394
+ </svg>
395
+ View project details
396
+ </summary>
397
+ <pre>nx show project {{ title }} --web</pre>
398
+ </details>
380
399
  <details>
381
400
  <summary>
382
401
  <svg
@@ -13,6 +13,7 @@ async function addVite(tree, options) {
13
13
  includeVitest: options.unitTestRunner === 'vitest',
14
14
  skipFormat: true,
15
15
  testEnvironment: 'jsdom',
16
+ addPlugin: options.addPlugin,
16
17
  });
17
18
  (0, vite_1.createOrEditViteConfig)(tree, {
18
19
  project: options.name,
@@ -18,6 +18,7 @@ export interface Schema {
18
18
  setParserOptionsProject?: boolean;
19
19
  skipPackageJson?: boolean;
20
20
  rootProject?: boolean;
21
+ addPlugin?: boolean;
21
22
  }
22
23
 
23
24
  export interface NormalizedSchema extends Schema {
@@ -17,6 +17,7 @@ async function addVite(tree, options) {
17
17
  includeVitest: options.unitTestRunner === 'vitest',
18
18
  skipFormat: true,
19
19
  testEnvironment: 'jsdom',
20
+ addPlugin: options.addPlugin,
20
21
  });
21
22
  tasks.push(viteTask);
22
23
  createOrEditViteConfig(tree, {
@@ -40,6 +41,7 @@ async function addVite(tree, options) {
40
41
  inSourceTests: options.inSourceTests,
41
42
  skipFormat: true,
42
43
  testEnvironment: 'jsdom',
44
+ addPlugin: options.addPlugin,
43
45
  });
44
46
  tasks.push(vitestTask);
45
47
  createOrEditViteConfig(tree, {
@@ -24,6 +24,7 @@ async function normalizeOptions(host, options) {
24
24
  }
25
25
  }
26
26
  const normalized = {
27
+ addPlugin: process.env.NX_ADD_PLUGINS !== 'false',
27
28
  ...options,
28
29
  bundler,
29
30
  fileName,
@@ -1,4 +1,5 @@
1
1
  import { GeneratorCallback, Tree } from '@nx/devkit';
2
2
  import { Schema } from './schema';
3
3
  export declare function libraryGenerator(tree: Tree, schema: Schema): Promise<GeneratorCallback>;
4
+ export declare function libraryGeneratorInternal(tree: Tree, schema: Schema): Promise<GeneratorCallback>;
4
5
  export default libraryGenerator;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.libraryGenerator = void 0;
3
+ exports.libraryGeneratorInternal = exports.libraryGenerator = void 0;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const js_1 = require("@nx/js");
6
6
  const init_1 = require("../init/init");
@@ -12,7 +12,11 @@ const component_1 = require("../component/component");
12
12
  const add_vite_1 = require("./lib/add-vite");
13
13
  const ensure_dependencies_1 = require("../../utils/ensure-dependencies");
14
14
  const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
15
- async function libraryGenerator(tree, schema) {
15
+ function libraryGenerator(tree, schema) {
16
+ return libraryGeneratorInternal(tree, { addPlugin: false, ...schema });
17
+ }
18
+ exports.libraryGenerator = libraryGenerator;
19
+ async function libraryGeneratorInternal(tree, schema) {
16
20
  const tasks = [];
17
21
  const options = await (0, normalize_options_1.normalizeOptions)(tree, schema);
18
22
  if (options.publishable === true && !schema.importPath) {
@@ -72,5 +76,5 @@ async function libraryGenerator(tree, schema) {
72
76
  });
73
77
  return (0, devkit_1.runTasksInSerial)(...tasks);
74
78
  }
75
- exports.libraryGenerator = libraryGenerator;
79
+ exports.libraryGeneratorInternal = libraryGeneratorInternal;
76
80
  exports.default = libraryGenerator;
@@ -25,6 +25,7 @@ export interface Schema {
25
25
  unitTestRunner?: 'vitest' | 'none';
26
26
  minimal?: boolean;
27
27
  e2eTestRunner?: 'cypress' | 'none';
28
+ addPlugin?: boolean;
28
29
  }
29
30
 
30
31
  export interface NormalizedSchema extends Schema {
@@ -1,4 +1,5 @@
1
1
  import { StorybookConfigureSchema } from './schema';
2
2
  import { Tree } from '@nx/devkit';
3
3
  export declare function storybookConfigurationGenerator(host: Tree, schema: StorybookConfigureSchema): Promise<import("@nx/devkit").GeneratorCallback>;
4
+ export declare function storybookConfigurationGeneratorInternal(host: Tree, schema: StorybookConfigureSchema): Promise<import("@nx/devkit").GeneratorCallback>;
4
5
  export default storybookConfigurationGenerator;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.storybookConfigurationGenerator = void 0;
3
+ exports.storybookConfigurationGeneratorInternal = exports.storybookConfigurationGenerator = void 0;
4
4
  const stories_1 = require("../stories/stories");
5
5
  const devkit_1 = require("@nx/devkit");
6
6
  const versions_1 = require("../../utils/versions");
@@ -13,7 +13,14 @@ async function generateStories(host, schema) {
13
13
  interactionTests: schema.interactionTests ?? true,
14
14
  });
15
15
  }
16
- async function storybookConfigurationGenerator(host, schema) {
16
+ function storybookConfigurationGenerator(host, schema) {
17
+ return storybookConfigurationGeneratorInternal(host, {
18
+ addPlugin: false,
19
+ ...schema,
20
+ });
21
+ }
22
+ exports.storybookConfigurationGenerator = storybookConfigurationGenerator;
23
+ async function storybookConfigurationGeneratorInternal(host, schema) {
17
24
  const { configurationGenerator } = (0, devkit_1.ensurePackage)('@nx/storybook', versions_1.nxVersion);
18
25
  const installTask = await configurationGenerator(host, {
19
26
  project: schema.project,
@@ -24,6 +31,7 @@ async function storybookConfigurationGenerator(host, schema) {
24
31
  configureStaticServe: schema.configureStaticServe,
25
32
  uiFramework: '@storybook/vue3-vite',
26
33
  skipFormat: true,
34
+ addPlugin: schema.addPlugin,
27
35
  });
28
36
  if (schema.generateStories) {
29
37
  await generateStories(host, schema);
@@ -31,5 +39,5 @@ async function storybookConfigurationGenerator(host, schema) {
31
39
  await (0, devkit_1.formatFiles)(host);
32
40
  return installTask;
33
41
  }
34
- exports.storybookConfigurationGenerator = storybookConfigurationGenerator;
42
+ exports.storybookConfigurationGeneratorInternal = storybookConfigurationGeneratorInternal;
35
43
  exports.default = storybookConfigurationGenerator;
@@ -9,4 +9,5 @@ export interface StorybookConfigureSchema {
9
9
  linter?: Linter;
10
10
  ignorePaths?: string[];
11
11
  configureStaticServe?: boolean;
12
+ addPlugin?: boolean;
12
13
  }
@@ -8,5 +8,6 @@ export declare function addLinting(host: Tree, options: {
8
8
  setParserOptionsProject?: boolean;
9
9
  skipPackageJson?: boolean;
10
10
  rootProject?: boolean;
11
+ addPlugin?: boolean;
11
12
  }, projectType: 'lib' | 'app'): Promise<import("@nx/devkit").GeneratorCallback>;
12
13
  export declare function editEslintConfigFiles(tree: Tree, projectRoot: string, rootProject?: boolean): void;
@@ -18,6 +18,7 @@ async function addLinting(host, options, projectType) {
18
18
  skipFormat: true,
19
19
  setParserOptionsProject: options.setParserOptionsProject,
20
20
  rootProject: options.rootProject,
21
+ addPlugin: options.addPlugin,
21
22
  });
22
23
  if ((0, eslint_file_1.isEslintConfigSupported)(host)) {
23
24
  (0, eslint_file_1.addExtendsToLintConfig)(host, options.projectRoot, [