@nx/vue 17.0.5 → 17.0.6

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.
Files changed (42) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +4 -9
  3. package/generators.json +3 -3
  4. package/index.d.ts +0 -3
  5. package/index.js +1 -3
  6. package/migrations.json +1 -11
  7. package/package.json +8 -8
  8. package/src/generators/application/application.d.ts +1 -2
  9. package/src/generators/application/application.js +3 -25
  10. package/src/generators/application/files/common/src/app/NxWelcome.vue.template +16 -56
  11. package/src/generators/application/lib/add-e2e.js +4 -13
  12. package/src/generators/application/lib/add-vite.js +2 -5
  13. package/src/generators/application/schema.d.ts +0 -1
  14. package/src/generators/application/schema.json +3 -3
  15. package/src/generators/component/component.d.ts +3 -3
  16. package/src/generators/component/lib/utils.d.ts +2 -2
  17. package/src/generators/component/schema.d.ts +6 -6
  18. package/src/generators/component/schema.json +11 -7
  19. package/src/generators/init/init.js +30 -12
  20. package/src/generators/init/schema.d.ts +4 -2
  21. package/src/generators/init/schema.json +16 -6
  22. package/src/generators/library/files/tsconfig.lib.json__tmpl__ +10 -3
  23. package/src/generators/library/lib/add-vite.js +1 -3
  24. package/src/generators/library/lib/normalize-options.js +0 -1
  25. package/src/generators/library/library.d.ts +0 -1
  26. package/src/generators/library/library.js +3 -16
  27. package/src/generators/library/schema.d.ts +0 -1
  28. package/src/generators/library/schema.json +1 -1
  29. package/src/generators/setup-tailwind/lib/add-tailwind-style-imports.js +0 -7
  30. package/src/generators/setup-tailwind/schema.json +1 -1
  31. package/src/generators/stories/schema.json +1 -1
  32. package/src/generators/stories/stories.js +5 -5
  33. package/src/generators/storybook-configuration/configuration.d.ts +0 -1
  34. package/src/generators/storybook-configuration/configuration.js +7 -15
  35. package/src/generators/storybook-configuration/schema.d.ts +1 -2
  36. package/src/generators/storybook-configuration/schema.json +4 -4
  37. package/src/utils/add-linting.d.ts +0 -1
  38. package/src/utils/add-linting.js +4 -1
  39. package/src/utils/versions.d.ts +2 -1
  40. package/src/utils/versions.js +4 -2
  41. package/src/utils/ensure-dependencies.d.ts +0 -6
  42. package/src/utils/ensure-dependencies.js +0 -24
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  (The MIT License)
2
2
 
3
- Copyright (c) 2017-2024 Narwhal Technologies Inc.
3
+ Copyright (c) 2017-2023 Narwhal Technologies Inc.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
package/README.md CHANGED
@@ -1,9 +1,4 @@
1
- <p style="text-align: center;">
2
- <picture>
3
- <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-dark.svg">
4
- <img alt="Nx - Smart Monorepos · Fast CI" src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-light.svg" width="100%">
5
- </picture>
6
- </p>
1
+ <p style="text-align: center;"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx.png" width="600" alt="Nx - Smart, Fast and Extensible Build System"></p>
7
2
 
8
3
  <div style="text-align: center;">
9
4
 
@@ -20,9 +15,9 @@
20
15
 
21
16
  <hr>
22
17
 
23
- # Nx: Smart Monorepos · Fast CI
18
+ # Nx: Smart, Fast and Extensible Build System
24
19
 
25
- Nx is a build system with built-in tooling and advanced CI capabilities. It helps you maintain and scale monorepos, both locally and on CI.
20
+ Nx is a next generation build system with first class monorepo support and powerful integrations.
26
21
 
27
22
  This package is a [Vue plugin for Nx](https://nx.dev/packages/vue).
28
23
 
@@ -64,5 +59,5 @@ npx nx@latest init
64
59
  - [Blog Posts About Nx](https://blog.nrwl.io/nx/home)
65
60
 
66
61
  <p style="text-align: center;"><a href="https://nx.dev/#learning-materials" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-courses-and-videos.svg"
67
- width="100%" alt="Nx - Smart Monorepos · Fast CI"></a></p>
62
+ width="100%" alt="Nx - Smart, Fast and Extensible Build System"></a></p>
68
63
 
package/generators.json CHANGED
@@ -10,13 +10,13 @@
10
10
  "hidden": true
11
11
  },
12
12
  "application": {
13
- "factory": "./src/generators/application/application#applicationGeneratorInternal",
13
+ "factory": "./src/generators/application/application",
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#libraryGeneratorInternal",
19
+ "factory": "./src/generators/library/library",
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#storybookConfigurationGeneratorInternal",
38
+ "factory": "./src/generators/storybook-configuration/configuration",
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/index.d.ts CHANGED
@@ -2,11 +2,8 @@ export * from './src/utils/versions';
2
2
  export { applicationGenerator } from './src/generators/application/application';
3
3
  export { libraryGenerator } from './src/generators/library/library';
4
4
  export { componentGenerator } from './src/generators/component/component';
5
- export { ComponentGeneratorSchema } from './src/generators/component/schema';
6
5
  export { storybookConfigurationGenerator } from './src/generators/storybook-configuration/configuration';
7
6
  export { storiesGenerator, StorybookStoriesSchema, } from './src/generators/stories/stories';
8
- export { setupTailwindGenerator } from './src/generators/setup-tailwind/setup-tailwind';
9
- export { SetupTailwindOptions } from './src/generators/setup-tailwind/schema';
10
7
  export { type InitSchema } from './src/generators/init/schema';
11
8
  export { vueInitGenerator } from './src/generators/init/init';
12
9
  export * from './src/utils/versions';
package/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.vueInitGenerator = exports.setupTailwindGenerator = exports.storiesGenerator = exports.storybookConfigurationGenerator = exports.componentGenerator = exports.libraryGenerator = exports.applicationGenerator = void 0;
3
+ exports.vueInitGenerator = exports.storiesGenerator = exports.storybookConfigurationGenerator = exports.componentGenerator = exports.libraryGenerator = exports.applicationGenerator = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  tslib_1.__exportStar(require("./src/utils/versions"), exports);
6
6
  var application_1 = require("./src/generators/application/application");
@@ -13,8 +13,6 @@ var configuration_1 = require("./src/generators/storybook-configuration/configur
13
13
  Object.defineProperty(exports, "storybookConfigurationGenerator", { enumerable: true, get: function () { return configuration_1.storybookConfigurationGenerator; } });
14
14
  var stories_1 = require("./src/generators/stories/stories");
15
15
  Object.defineProperty(exports, "storiesGenerator", { enumerable: true, get: function () { return stories_1.storiesGenerator; } });
16
- var setup_tailwind_1 = require("./src/generators/setup-tailwind/setup-tailwind");
17
- Object.defineProperty(exports, "setupTailwindGenerator", { enumerable: true, get: function () { return setup_tailwind_1.setupTailwindGenerator; } });
18
16
  var init_1 = require("./src/generators/init/init");
19
17
  Object.defineProperty(exports, "vueInitGenerator", { enumerable: true, get: function () { return init_1.vueInitGenerator; } });
20
18
  tslib_1.__exportStar(require("./src/utils/versions"), exports);
package/migrations.json CHANGED
@@ -1,14 +1,4 @@
1
1
  {
2
2
  "generators": {},
3
- "packageJsonUpdates": {
4
- "17.2.0": {
5
- "version": "17.2.0-beta.2",
6
- "packages": {
7
- "@vitejs/plugin-vue": {
8
- "version": "^4.5.0",
9
- "alwaysAddToPackageJson": false
10
- }
11
- }
12
- }
13
- }
3
+ "packageJsonUpdates": {}
14
4
  }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@nx/vue",
3
- "version": "17.0.5",
3
+ "version": "v17.0.6",
4
4
  "private": false,
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.",
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 Jest, 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": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/nrwl/nx.git",
@@ -28,13 +28,13 @@
28
28
  "migrations": "./migrations.json"
29
29
  },
30
30
  "dependencies": {
31
- "minimatch": "9.0.3",
31
+ "minimatch": "3.0.5",
32
32
  "tslib": "^2.3.0",
33
- "@nx/devkit": "17.0.5",
34
- "@nx/js": "17.0.5",
35
- "@nx/eslint": "17.0.5",
36
- "@nx/vite": "17.0.5",
37
- "@nx/web": "17.0.5"
33
+ "@nx/devkit": "v17.0.6",
34
+ "@nx/js": "v17.0.6",
35
+ "@nx/eslint": "v17.0.6",
36
+ "@nx/vite": "v17.0.6",
37
+ "@nx/web": "v17.0.6"
38
38
  },
39
39
  "publishConfig": {
40
40
  "access": "public"
@@ -1,5 +1,4 @@
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>;
4
- export declare function applicationGeneratorInternal(tree: Tree, _options: Schema): Promise<GeneratorCallback>;
3
+ export declare function applicationGenerator(tree: Tree, _options: Schema): Promise<GeneratorCallback>;
5
4
  export default applicationGenerator;
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.applicationGeneratorInternal = exports.applicationGenerator = void 0;
3
+ exports.applicationGenerator = void 0;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const eslint_1 = require("@nx/eslint");
6
- const js_1 = require("@nx/js");
7
6
  const normalize_options_1 = require("./lib/normalize-options");
8
7
  const init_1 = require("../init/init");
9
8
  const add_linting_1 = require("../../utils/add-linting");
@@ -11,15 +10,8 @@ const add_e2e_1 = require("./lib/add-e2e");
11
10
  const create_application_files_1 = require("./lib/create-application-files");
12
11
  const add_vite_1 = require("./lib/add-vite");
13
12
  const create_ts_config_1 = require("../../utils/create-ts-config");
14
- const ensure_dependencies_1 = require("../../utils/ensure-dependencies");
15
- const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
16
- function applicationGenerator(tree, options) {
17
- return applicationGeneratorInternal(tree, { addPlugin: false, ...options });
18
- }
19
- exports.applicationGenerator = applicationGenerator;
20
- async function applicationGeneratorInternal(tree, _options) {
13
+ async function applicationGenerator(tree, _options) {
21
14
  const options = await (0, normalize_options_1.normalizeOptions)(tree, _options);
22
- options.addPlugin ??= process.env.NX_ADD_PLUGINS !== 'false';
23
15
  const tasks = [];
24
16
  (0, devkit_1.addProjectConfiguration)(tree, options.name, {
25
17
  root: options.appProjectRoot,
@@ -27,20 +19,10 @@ async function applicationGeneratorInternal(tree, _options) {
27
19
  sourceRoot: `${options.appProjectRoot}/src`,
28
20
  targets: {},
29
21
  });
30
- tasks.push(await (0, js_1.initGenerator)(tree, {
31
- ...options,
32
- tsConfigName: options.rootProject
33
- ? 'tsconfig.json'
34
- : 'tsconfig.base.json',
35
- skipFormat: true,
36
- }));
37
22
  tasks.push(await (0, init_1.vueInitGenerator)(tree, {
38
23
  ...options,
39
24
  skipFormat: true,
40
25
  }));
41
- if (!options.skipPackageJson) {
42
- tasks.push((0, ensure_dependencies_1.ensureDependencies)(tree, options));
43
- }
44
26
  if (!options.rootProject) {
45
27
  (0, create_ts_config_1.extractTsConfigBase)(tree);
46
28
  }
@@ -53,7 +35,6 @@ async function applicationGeneratorInternal(tree, _options) {
53
35
  skipPackageJson: options.skipPackageJson,
54
36
  setParserOptionsProject: options.setParserOptionsProject,
55
37
  rootProject: options.rootProject,
56
- addPlugin: options.addPlugin,
57
38
  }, 'app'));
58
39
  tasks.push(await (0, add_vite_1.addVite)(tree, options));
59
40
  tasks.push(await (0, add_e2e_1.addE2e)(tree, options));
@@ -61,10 +42,7 @@ async function applicationGeneratorInternal(tree, _options) {
61
42
  (0, devkit_1.toJS)(tree);
62
43
  if (!options.skipFormat)
63
44
  await (0, devkit_1.formatFiles)(tree);
64
- tasks.push(() => {
65
- (0, log_show_project_command_1.logShowProjectCommand)(options.projectName);
66
- });
67
45
  return (0, devkit_1.runTasksInSerial)(...tasks);
68
46
  }
69
- exports.applicationGeneratorInternal = applicationGeneratorInternal;
47
+ exports.applicationGenerator = applicationGenerator;
70
48
  exports.default = applicationGenerator;
@@ -235,8 +235,7 @@ defineProps<{
235
235
  </div>
236
236
  <div id="other-links">
237
237
  <a
238
- id="nx-console"
239
- class="button-pill rounded shadow"
238
+ class="button-pill nx-console rounded shadow"
240
239
  href="https://marketplace.visualstudio.com/items?itemName=nrwl.angular-console&utm_source=nx-project"
241
240
  target="_blank"
242
241
  rel="noreferrer"
@@ -252,35 +251,23 @@ defineProps<{
252
251
  </svg>
253
252
  <span>
254
253
  Install Nx Console for VSCode
255
- <span>The official VSCode extension for Nx.</span>
254
+ <span>The official VSCode plugin for Nx.</span>
256
255
  </span>
257
256
  </a>
258
257
  <a
259
- id="nx-console-jetbrains"
260
- class="button-pill rounded shadow"
258
+ class="button-pill nx-console rounded shadow"
261
259
  href="https://plugins.jetbrains.com/plugin/21060-nx-console"
262
260
  target="_blank"
263
261
  rel="noreferrer"
264
262
  >
265
263
  <svg
266
- height="48"
267
- width="48"
268
- viewBox="20 20 60 60"
264
+ fill="currentColor"
265
+ role="img"
266
+ viewBox="0 0 24 24"
269
267
  xmlns="http://www.w3.org/2000/svg"
270
268
  >
271
- <path d="m22.5 22.5h60v60h-60z" />
272
- <g fill="#fff">
273
- <path d="m29.03 71.25h22.5v3.75h-22.5z" />
274
- <path d="m28.09 38 1.67-1.58a1.88 1.88 0 0 0 1.47.87c.64 0 1.06-.44 1.06-1.31v-5.98h2.58v6a3.48 3.48 0 0 1 -.87 2.6 3.56 3.56 0 0 1 -2.57.95 3.84 3.84 0 0 1 -3.34-1.55z" />
275
- <path d="m36 30h7.53v2.19h-5v1.44h4.49v2h-4.42v1.49h5v2.21h-7.6z" />
276
- <path d="m47.23 32.29h-2.8v-2.29h8.21v2.27h-2.81v7.1h-2.6z" />
277
- <path d="m29.13 43.08h4.42a3.53 3.53 0 0 1 2.55.83 2.09 2.09 0 0 1 .6 1.53 2.16 2.16 0 0 1 -1.44 2.09 2.27 2.27 0 0 1 1.86 2.29c0 1.61-1.31 2.59-3.55 2.59h-4.44zm5 2.89c0-.52-.42-.8-1.18-.8h-1.29v1.64h1.24c.79 0 1.25-.26 1.25-.81zm-.9 2.66h-1.57v1.73h1.62c.8 0 1.24-.31 1.24-.86 0-.5-.4-.87-1.27-.87z" />
278
- <path d="m38 43.08h4.1a4.19 4.19 0 0 1 3 1 2.93 2.93 0 0 1 .9 2.19 3 3 0 0 1 -1.93 2.89l2.24 3.27h-3l-1.88-2.84h-.87v2.84h-2.56zm4 4.5c.87 0 1.39-.43 1.39-1.11 0-.75-.54-1.12-1.4-1.12h-1.44v2.26z" />
279
- <path d="m49.59 43h2.5l4 9.44h-2.79l-.67-1.69h-3.63l-.67 1.69h-2.71zm2.27 5.73-1-2.65-1.06 2.65z" />
280
- <path d="m56.46 43.05h2.6v9.37h-2.6z" />
281
- <path d="m60.06 43.05h2.42l3.37 5v-5h2.57v9.37h-2.26l-3.53-5.14v5.14h-2.57z" />
282
- <path d="m68.86 51 1.45-1.73a4.84 4.84 0 0 0 3 1.13c.71 0 1.08-.24 1.08-.65 0-.4-.31-.6-1.59-.91-2-.46-3.53-1-3.53-2.93 0-1.74 1.37-3 3.62-3a5.89 5.89 0 0 1 3.86 1.25l-1.26 1.84a4.63 4.63 0 0 0 -2.62-.92c-.63 0-.94.25-.94.6 0 .42.32.61 1.63.91 2.14.46 3.44 1.16 3.44 2.91 0 1.91-1.51 3-3.79 3a6.58 6.58 0 0 1 -4.35-1.5z" />
283
- </g>
269
+ <title>IntelliJ</title>
270
+ <path d="M0 0v24h24V0zm3.723 3.111h5v1.834h-1.39v6.277h1.39v1.834h-5v-1.834h1.444V4.945H3.723zm11.055 0H17v6.5c0 .612-.055 1.111-.222 1.556-.167.444-.39.777-.723 1.11-.277.279-.666.557-1.11.668a3.933 3.933 0 0 1-1.445.278c-.778 0-1.444-.167-1.944-.445a4.81 4.81 0 0 1-1.279-1.056l1.39-1.555c.277.334.555.555.833.722.277.167.611.278.945.278.389 0 .721-.111 1-.389.221-.278.333-.667.333-1.278zM2.222 19.5h9V21h-9z"></path>
284
271
  </svg>
285
272
  <span>
286
273
  Install Nx Console for JetBrains
@@ -309,7 +296,7 @@ defineProps<{
309
296
  />
310
297
  </svg>
311
298
  <h2>
312
- Nx Cloud
299
+ NxCloud
313
300
  <span>Enable faster CI & better DX</span>
314
301
  </h2>
315
302
  </div>
@@ -317,13 +304,14 @@ defineProps<{
317
304
  You can activate distributed tasks executions and caching by
318
305
  running:
319
306
  </p>
320
- <pre>nx connect</pre>
307
+ <pre>nx connect-to-nx-cloud</pre>
321
308
  <a
322
309
  href="https://nx.app/?utm_source=nx-project"
323
310
  target="_blank"
324
311
  rel="noreferrer"
325
312
  >
326
- What is Nx Cloud?
313
+ {' '}
314
+ What is Nx Cloud?{' '}
327
315
  </a>
328
316
  </div>
329
317
  <a
@@ -371,30 +359,11 @@ defineProps<{
371
359
  </summary>
372
360
  <pre>
373
361
  <span># Generate UI lib</span>
374
- nx g @nx/vue:lib ui
362
+ nx g @nx/react:lib ui
375
363
  <span># Add a component</span>
376
- nx g @nx/vue:component ui/src/lib/button
364
+ nx g @nx/react:component button --project ui
377
365
  </pre>
378
366
  </details>
379
- <details>
380
- <summary>
381
- <svg
382
- fill="none"
383
- stroke="currentColor"
384
- viewBox="0 0 24 24"
385
- xmlns="http://www.w3.org/2000/svg"
386
- >
387
- <path
388
- strokeLinecap="round"
389
- strokeLinejoin="round"
390
- strokeWidth="2"
391
- 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"
392
- />
393
- </svg>
394
- View project details
395
- </summary>
396
- <pre>nx show project {{ title }} --web</pre>
397
- </details>
398
367
  <details>
399
368
  <summary>
400
369
  <svg
@@ -684,21 +653,12 @@ pre {
684
653
  .button-pill:hover {
685
654
  color: rgba(255, 255, 255, 1) !important;
686
655
  }
687
- #nx-console:hover {
656
+ .nx-console:hover {
688
657
  background-color: rgba(0, 122, 204, 1);
689
658
  }
690
- #nx-console svg {
659
+ .nx-console svg {
691
660
  color: rgba(0, 122, 204, 1);
692
661
  }
693
- #nx-console-jetbrains {
694
- margin-top: 2rem;
695
- }
696
- #nx-console-jetbrains:hover {
697
- background-color: rgba(255, 49, 140, 1);
698
- }
699
- #nx-console-jetbrains svg {
700
- color: rgba(255, 49, 140, 1);
701
- }
702
662
  #nx-repo:hover {
703
663
  background-color: rgba(24, 23, 23, 1);
704
664
  }
@@ -7,17 +7,10 @@ const versions_1 = require("../../../utils/versions");
7
7
  async function addE2e(tree, options) {
8
8
  switch (options.e2eTestRunner) {
9
9
  case 'cypress': {
10
- const nxJson = (0, devkit_1.readNxJson)(tree);
11
- const hasPlugin = nxJson.plugins?.some((p) => typeof p === 'string'
12
- ? p === '@nx/vite/plugin'
13
- : p.plugin === '@nx/vite/plugin');
14
- if (!hasPlugin) {
15
- await (0, web_1.webStaticServeGenerator)(tree, {
16
- buildTarget: `${options.projectName}:build`,
17
- targetName: 'serve-static',
18
- spa: true,
19
- });
20
- }
10
+ (0, web_1.webStaticServeGenerator)(tree, {
11
+ buildTarget: `${options.projectName}:build`,
12
+ targetName: 'serve-static',
13
+ });
21
14
  const { configurationGenerator } = (0, devkit_1.ensurePackage)('@nx/cypress', versions_1.nxVersion);
22
15
  (0, devkit_1.addProjectConfiguration)(tree, options.e2eProjectName, {
23
16
  projectType: 'application',
@@ -34,7 +27,6 @@ async function addE2e(tree, options) {
34
27
  bundler: 'vite',
35
28
  skipFormat: true,
36
29
  devServerTarget: `${options.projectName}:serve`,
37
- baseUrl: 'http://localhost:4200',
38
30
  jsx: true,
39
31
  });
40
32
  }
@@ -48,7 +40,6 @@ async function addE2e(tree, options) {
48
40
  implicitDependencies: [options.projectName],
49
41
  });
50
42
  return configurationGenerator(tree, {
51
- ...options,
52
43
  project: options.e2eProjectName,
53
44
  skipFormat: true,
54
45
  skipPackageJson: options.skipPackageJson,
@@ -13,7 +13,6 @@ async function addVite(tree, options) {
13
13
  includeVitest: options.unitTestRunner === 'vitest',
14
14
  skipFormat: true,
15
15
  testEnvironment: 'jsdom',
16
- addPlugin: options.addPlugin,
17
16
  });
18
17
  (0, vite_1.createOrEditViteConfig)(tree, {
19
18
  project: options.name,
@@ -26,10 +25,8 @@ async function addVite(tree, options) {
26
25
  // Update build to skip type checking since tsc won't work on .vue files.
27
26
  // Need to use vue-tsc instead.
28
27
  const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, options.name);
29
- if (projectConfig.targets?.build?.options) {
30
- projectConfig.targets.build.options.skipTypeCheck = true;
31
- (0, devkit_1.updateProjectConfiguration)(tree, options.name, projectConfig);
32
- }
28
+ projectConfig.targets.build.options.skipTypeCheck = true;
29
+ (0, devkit_1.updateProjectConfiguration)(tree, options.name, projectConfig);
33
30
  return viteTask;
34
31
  }
35
32
  exports.addVite = addVite;
@@ -18,7 +18,6 @@ export interface Schema {
18
18
  setParserOptionsProject?: boolean;
19
19
  skipPackageJson?: boolean;
20
20
  rootProject?: boolean;
21
- addPlugin?: boolean;
22
21
  }
23
22
 
24
23
  export interface NormalizedSchema extends Schema {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://json-schema.org/schema",
2
+ "$schema": "http://json-schema.org/schema",
3
3
  "cli": "nx",
4
4
  "$id": "NxVueApp",
5
5
  "title": "Create a Vue Application",
@@ -52,11 +52,11 @@
52
52
  },
53
53
  {
54
54
  "value": "scss",
55
- "label": "SASS(.scss) [ https://sass-lang.com ]"
55
+ "label": "SASS(.scss) [ http://sass-lang.com ]"
56
56
  },
57
57
  {
58
58
  "value": "less",
59
- "label": "LESS [ https://lesscss.org ]"
59
+ "label": "LESS [ http://lesscss.org ]"
60
60
  },
61
61
  {
62
62
  "value": "none",
@@ -1,5 +1,5 @@
1
1
  import { Tree } from '@nx/devkit';
2
- import { ComponentGeneratorSchema } from './schema';
3
- export declare function componentGenerator(host: Tree, schema: ComponentGeneratorSchema): Promise<void>;
4
- export declare function componentGeneratorInternal(host: Tree, schema: ComponentGeneratorSchema): Promise<void>;
2
+ import { Schema } from './schema';
3
+ export declare function componentGenerator(host: Tree, schema: Schema): Promise<void>;
4
+ export declare function componentGeneratorInternal(host: Tree, schema: Schema): Promise<void>;
5
5
  export default componentGenerator;
@@ -1,4 +1,4 @@
1
1
  import { Tree } from '@nx/devkit';
2
- import { NormalizedSchema, ComponentGeneratorSchema } from '../schema';
3
- export declare function normalizeOptions(host: Tree, options: ComponentGeneratorSchema): Promise<NormalizedSchema>;
2
+ import { NormalizedSchema, Schema } from '../schema';
3
+ export declare function normalizeOptions(host: Tree, options: Schema): Promise<NormalizedSchema>;
4
4
  export declare function addExportsToBarrel(host: Tree, options: NormalizedSchema): void;
@@ -1,4 +1,4 @@
1
- export interface ComponentGeneratorSchema {
1
+ export interface Schema {
2
2
  name: string;
3
3
  skipTests?: boolean;
4
4
  directory?: string;
@@ -11,24 +11,24 @@ export interface ComponentGeneratorSchema {
11
11
  nameAndDirectoryFormat?: 'as-provided' | 'derived';
12
12
 
13
13
  /**
14
- * @deprecated Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19.
14
+ * @deprecated Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v18.
15
15
  */
16
16
  flat?: boolean;
17
17
  /**
18
- * @deprecated Provide the desired `directory` option instead and use the `as-provided` format. It will be removed in Nx v19.
18
+ * @deprecated Provide the desired `directory` option instead and use the `as-provided` format. It will be removed in Nx v18.
19
19
  */
20
20
  pascalCaseDirectory?: boolean;
21
21
  /**
22
- * @deprecated Provide the desired `name` option instead and use the `as-provided` format. It will be removed in Nx v19.
22
+ * @deprecated Provide the desired `name` option instead and use the `as-provided` format. It will be removed in Nx v18.
23
23
  */
24
24
  pascalCaseFiles?: boolean;
25
25
  /**
26
- * @deprecated Provide the `directory` option instead. The project will be determined from the directory provided. It will be removed in Nx v19.
26
+ * @deprecated Provide the `directory` option instead. The project will be determined from the directory provided. It will be removed in Nx v18.
27
27
  */
28
28
  project?: string;
29
29
  }
30
30
 
31
- export interface NormalizedSchema extends ComponentGeneratorSchema {
31
+ export interface NormalizedSchema extends Schema {
32
32
  projectName: string;
33
33
  projectSourceRoot: string;
34
34
  fileName: string;
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://json-schema.org/schema",
2
+ "$schema": "http://json-schema.org/schema",
3
3
  "cli": "nx",
4
4
  "$id": "NxVueComponent",
5
5
  "title": "Create a Vue Component",
@@ -7,8 +7,12 @@
7
7
  "type": "object",
8
8
  "examples": [
9
9
  {
10
- "command": "nx g @nx/vue:component --directory=my-app/src/app/one --name=one --nameAndDirectoryFormat=as-provided --unitTestRunner=vitest",
11
- "description": "Generate a component in the `my-app` application"
10
+ "command": "nx g component my-component --project=mylib",
11
+ "description": "Generate a component in the `mylib` library"
12
+ },
13
+ {
14
+ "command": "nx g component my-component --project=mylib --classComponent",
15
+ "description": "Generate a class component in the `mylib` library"
12
16
  }
13
17
  ],
14
18
  "properties": {
@@ -19,7 +23,7 @@
19
23
  "$default": {
20
24
  "$source": "projectName"
21
25
  },
22
- "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v19."
26
+ "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v18."
23
27
  },
24
28
  "name": {
25
29
  "type": "string",
@@ -57,7 +61,7 @@
57
61
  "type": "boolean",
58
62
  "description": "Create component at the source root rather than its own directory.",
59
63
  "default": false,
60
- "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v19."
64
+ "x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. It will be removed in Nx v18."
61
65
  },
62
66
  "export": {
63
67
  "type": "boolean",
@@ -71,14 +75,14 @@
71
75
  "description": "Use pascal case component file name (e.g. `App.tsx`).",
72
76
  "alias": "P",
73
77
  "default": false,
74
- "x-deprecated": "Provide the desired `name` option instead and use the `as-provided` format. It will be removed in Nx v19."
78
+ "x-deprecated": "Provide the desired `name` option instead and use the `as-provided` format. It will be removed in Nx v18."
75
79
  },
76
80
  "pascalCaseDirectory": {
77
81
  "type": "boolean",
78
82
  "description": "Use pascal case directory name (e.g. `App/App.tsx`).",
79
83
  "alias": "R",
80
84
  "default": false,
81
- "x-deprecated": "Provide the desired `directory` option instead and use the `as-provided` format. It will be removed in Nx v19."
85
+ "x-deprecated": "Provide the desired `directory` option instead and use the `as-provided` format. It will be removed in Nx v18."
82
86
  },
83
87
  "routing": {
84
88
  "type": "boolean",
@@ -2,22 +2,40 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.vueInitGenerator = void 0;
4
4
  const devkit_1 = require("@nx/devkit");
5
+ const js_1 = require("@nx/js");
5
6
  const versions_1 = require("../../utils/versions");
6
7
  function updateDependencies(host, schema) {
7
- const tasks = [];
8
- tasks.push((0, devkit_1.removeDependenciesFromPackageJson)(host, ['@nx/vue'], []));
9
- tasks.push((0, devkit_1.addDependenciesToPackageJson)(host, { vue: versions_1.vueVersion }, { '@nx/vue': versions_1.nxVersion }, undefined, schema.keepExistingVersions));
10
- return (0, devkit_1.runTasksInSerial)(...tasks);
11
- }
12
- async function vueInitGenerator(host, schema) {
13
- let installTask = () => { };
14
- if (!schema.skipPackageJson) {
15
- installTask = updateDependencies(host, schema);
8
+ (0, devkit_1.removeDependenciesFromPackageJson)(host, ['@nx/vue'], []);
9
+ let dependencies = {
10
+ vue: versions_1.vueVersion,
11
+ };
12
+ let devDependencies = {
13
+ '@nx/vue': versions_1.nxVersion,
14
+ '@vue/tsconfig': versions_1.vueTsconfigVersion,
15
+ '@vue/test-utils': versions_1.vueTestUtilsVersion,
16
+ '@vitejs/plugin-vue': versions_1.vitePluginVueVersion,
17
+ 'vue-tsc': versions_1.vueTscVersion,
18
+ };
19
+ if (schema.routing) {
20
+ dependencies['vue-router'] = versions_1.vueRouterVersion;
21
+ }
22
+ if (schema.style === 'scss') {
23
+ devDependencies['sass'] = versions_1.sassVersion;
16
24
  }
17
- if (!schema.skipFormat) {
18
- await (0, devkit_1.formatFiles)(host);
25
+ else if (schema.style === 'less') {
26
+ devDependencies['less'] = versions_1.lessVersion;
19
27
  }
20
- return installTask;
28
+ return (0, devkit_1.addDependenciesToPackageJson)(host, dependencies, devDependencies);
29
+ }
30
+ async function vueInitGenerator(host, schema) {
31
+ const tasks = [];
32
+ tasks.push(await (0, js_1.initGenerator)(host, {
33
+ ...schema,
34
+ tsConfigName: schema.rootProject ? 'tsconfig.json' : 'tsconfig.base.json',
35
+ skipFormat: true,
36
+ }));
37
+ tasks.push(updateDependencies(host, schema));
38
+ return (0, devkit_1.runTasksInSerial)(...tasks);
21
39
  }
22
40
  exports.vueInitGenerator = vueInitGenerator;
23
41
  exports.default = vueInitGenerator;
@@ -1,5 +1,7 @@
1
1
  export interface InitSchema {
2
2
  skipFormat?: boolean;
3
- skipPackageJson?: boolean;
4
- keepExistingVersions?: boolean;
3
+ js?: boolean;
4
+ rootProject?: boolean;
5
+ routing?: boolean;
6
+ style?: 'css' | 'scss' | 'less' | 'none';
5
7
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://json-schema.org/schema",
2
+ "$schema": "http://json-schema.org/schema",
3
3
  "$id": "NxVueInit",
4
4
  "title": "Init Vue Plugin",
5
5
  "description": "Initialize a Vue Plugin.",
@@ -11,16 +11,26 @@
11
11
  "type": "boolean",
12
12
  "default": false
13
13
  },
14
- "skipPackageJson": {
15
- "description": "Do not add dependencies to `package.json`.",
14
+ "js": {
16
15
  "type": "boolean",
16
+ "description": "Use JavaScript instead of TypeScript",
17
17
  "default": false
18
18
  },
19
- "keepExistingVersions": {
19
+ "rootProject": {
20
+ "description": "Create a project at the root of the workspace",
20
21
  "type": "boolean",
21
- "x-priority": "internal",
22
- "description": "Keep existing dependencies versions",
23
22
  "default": false
23
+ },
24
+ "routing": {
25
+ "type": "boolean",
26
+ "description": "Generate application with routes.",
27
+ "x-prompt": "Would you like to add Vue Router to this application?",
28
+ "default": false
29
+ },
30
+ "style": {
31
+ "description": "The file extension to be used for style files.",
32
+ "type": "string",
33
+ "default": "css"
24
34
  }
25
35
  },
26
36
  "required": []
@@ -2,7 +2,16 @@
2
2
  "extends": "./tsconfig.json",
3
3
  "compilerOptions": {
4
4
  "outDir": "<%= offsetFromRoot %>dist/out-tsc",
5
+ "baseUrl": ".",
6
+ "paths": {
7
+ "@/*": ["./src/*"]
8
+ },
5
9
  "types": [],
10
+ "lib": [
11
+ "ES2016",
12
+ "DOM",
13
+ "DOM.Iterable"
14
+ ],
6
15
  },
7
16
  "exclude": [
8
17
  "src/**/__tests__/*",
@@ -13,9 +22,7 @@
13
22
  "src/**/*.spec.js",
14
23
  "src/**/*.test.js",
15
24
  "src/**/*.spec.jsx",
16
- "src/**/*.test.jsx",
17
- "src/**/*.spec.vue",
18
- "src/**/*.test.vue"
25
+ "src/**/*.test.jsx"
19
26
  ],
20
27
  "include": [
21
28
  "src/**/*.js",
@@ -17,7 +17,6 @@ async function addVite(tree, options) {
17
17
  includeVitest: options.unitTestRunner === 'vitest',
18
18
  skipFormat: true,
19
19
  testEnvironment: 'jsdom',
20
- addPlugin: options.addPlugin,
21
20
  });
22
21
  tasks.push(viteTask);
23
22
  createOrEditViteConfig(tree, {
@@ -37,11 +36,10 @@ async function addVite(tree, options) {
37
36
  const vitestTask = await vitestGenerator(tree, {
38
37
  uiFramework: 'none',
39
38
  project: options.name,
40
- coverageProvider: 'v8',
39
+ coverageProvider: 'c8',
41
40
  inSourceTests: options.inSourceTests,
42
41
  skipFormat: true,
43
42
  testEnvironment: 'jsdom',
44
- addPlugin: options.addPlugin,
45
43
  });
46
44
  tasks.push(vitestTask);
47
45
  createOrEditViteConfig(tree, {
@@ -24,7 +24,6 @@ async function normalizeOptions(host, options) {
24
24
  }
25
25
  }
26
26
  const normalized = {
27
- addPlugin: process.env.NX_ADD_PLUGINS !== 'false',
28
27
  ...options,
29
28
  bundler,
30
29
  fileName,
@@ -1,5 +1,4 @@
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>;
5
4
  export default libraryGenerator;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.libraryGeneratorInternal = exports.libraryGenerator = void 0;
3
+ 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");
@@ -10,13 +10,7 @@ const create_library_files_1 = require("./lib/create-library-files");
10
10
  const create_ts_config_1 = require("../../utils/create-ts-config");
11
11
  const component_1 = require("../component/component");
12
12
  const add_vite_1 = require("./lib/add-vite");
13
- const ensure_dependencies_1 = require("../../utils/ensure-dependencies");
14
- const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
15
- function libraryGenerator(tree, schema) {
16
- return libraryGeneratorInternal(tree, { addPlugin: false, ...schema });
17
- }
18
- exports.libraryGenerator = libraryGenerator;
19
- async function libraryGeneratorInternal(tree, schema) {
13
+ async function libraryGenerator(tree, schema) {
20
14
  const tasks = [];
21
15
  const options = await (0, normalize_options_1.normalizeOptions)(tree, schema);
22
16
  if (options.publishable === true && !schema.importPath) {
@@ -29,14 +23,10 @@ async function libraryGeneratorInternal(tree, schema) {
29
23
  tags: options.parsedTags,
30
24
  targets: {},
31
25
  });
32
- tasks.push(await (0, js_1.initGenerator)(tree, { ...schema, skipFormat: true }));
33
26
  tasks.push(await (0, init_1.vueInitGenerator)(tree, {
34
27
  ...options,
35
28
  skipFormat: true,
36
29
  }));
37
- if (!options.skipPackageJson) {
38
- tasks.push((0, ensure_dependencies_1.ensureDependencies)(tree, options));
39
- }
40
30
  (0, create_ts_config_1.extractTsConfigBase)(tree);
41
31
  tasks.push(await (0, add_linting_1.addLinting)(tree, options, 'lib'));
42
32
  (0, create_library_files_1.createLibraryFiles)(tree, options);
@@ -71,10 +61,7 @@ async function libraryGeneratorInternal(tree, schema) {
71
61
  (0, devkit_1.toJS)(tree);
72
62
  if (!options.skipFormat)
73
63
  await (0, devkit_1.formatFiles)(tree);
74
- tasks.push(() => {
75
- (0, log_show_project_command_1.logShowProjectCommand)(options.name);
76
- });
77
64
  return (0, devkit_1.runTasksInSerial)(...tasks);
78
65
  }
79
- exports.libraryGeneratorInternal = libraryGeneratorInternal;
66
+ exports.libraryGenerator = libraryGenerator;
80
67
  exports.default = libraryGenerator;
@@ -25,7 +25,6 @@ export interface Schema {
25
25
  unitTestRunner?: 'vitest' | 'none';
26
26
  minimal?: boolean;
27
27
  e2eTestRunner?: 'cypress' | 'none';
28
- addPlugin?: boolean;
29
28
  }
30
29
 
31
30
  export interface NormalizedSchema extends Schema {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://json-schema.org/schema",
2
+ "$schema": "http://json-schema.org/schema",
3
3
  "cli": "nx",
4
4
  "$id": "NxVueLibrary",
5
5
  "title": "Create a Vue Library",
@@ -7,19 +7,12 @@ const knownStylesheetLocations = [
7
7
  'src/styles.css',
8
8
  'src/styles.scss',
9
9
  'src/styles.less',
10
- // What we generate for nuxt by default
11
- 'src/assets/css/styles.css',
12
- 'src/assets/css/styles.scss',
13
- 'src/assets/css/styles.less',
14
10
  // Other common locations (e.g. what `npm create vue` does)
15
11
  'src/assets/styles.css',
16
12
  'src/assets/styles.scss',
17
13
  'src/assets/styles.less',
18
14
  ];
19
15
  function addTailwindStyleImports(tree, project, _options) {
20
- if (_options.stylesheet) {
21
- knownStylesheetLocations.push(_options.stylesheet);
22
- }
23
16
  const stylesPath = knownStylesheetLocations
24
17
  .map((file) => (0, devkit_1.joinPathFragments)(project.root, file))
25
18
  .find((file) => tree.exists(file));
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://json-schema.org/schema",
2
+ "$schema": "http://json-schema.org/schema",
3
3
  "cli": "nx",
4
4
  "$id": "NxVueTailwindSetupGenerator",
5
5
  "title": "Configures Tailwind CSS for an application or a library.",
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://json-schema.org/schema",
2
+ "$schema": "http://json-schema.org/schema",
3
3
  "cli": "nx",
4
4
  "$id": "NxVueStorybookStories",
5
5
  "title": "Generate Vue Storybook stories",
@@ -5,13 +5,13 @@ const devkit_1 = require("@nx/devkit");
5
5
  const path_1 = require("path");
6
6
  const versions_1 = require("../../utils/versions");
7
7
  const component_story_1 = require("./lib/component-story");
8
- const minimatch_1 = require("minimatch");
8
+ const minimatch = require("minimatch");
9
9
  async function createAllStories(tree, projectName, interactionTests, js, projectConfiguration, ignorePaths) {
10
- const { sourceRoot } = projectConfiguration;
10
+ const { sourceRoot, root } = projectConfiguration;
11
11
  let componentPaths = [];
12
12
  const pathsToCheck = [
13
- (0, devkit_1.joinPathFragments)(sourceRoot, 'app'), // Default component folder for apps
14
- (0, devkit_1.joinPathFragments)(sourceRoot, 'lib'), // Default component folder for libs
13
+ (0, devkit_1.joinPathFragments)(sourceRoot, 'app'),
14
+ (0, devkit_1.joinPathFragments)(sourceRoot, 'lib'),
15
15
  (0, devkit_1.joinPathFragments)(sourceRoot, 'components'), // Additional component folder used by Nuxt
16
16
  ];
17
17
  for (const p of pathsToCheck) {
@@ -19,7 +19,7 @@ async function createAllStories(tree, projectName, interactionTests, js, project
19
19
  // Ignore private files starting with "_".
20
20
  if ((0, path_1.basename)(path).startsWith('_'))
21
21
  return;
22
- if (ignorePaths?.some((pattern) => (0, minimatch_1.minimatch)(path, pattern)))
22
+ if (ignorePaths?.some((pattern) => minimatch(path, pattern)))
23
23
  return;
24
24
  if (path.endsWith('.vue')) {
25
25
  // Let's see if the .stories.* file exists
@@ -1,5 +1,4 @@
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>;
5
4
  export default storybookConfigurationGenerator;
@@ -1,37 +1,29 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.storybookConfigurationGeneratorInternal = exports.storybookConfigurationGenerator = void 0;
3
+ 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");
7
7
  async function generateStories(host, schema) {
8
8
  await (0, stories_1.default)(host, {
9
- project: schema.project,
9
+ project: schema.name,
10
10
  js: schema.js,
11
11
  ignorePaths: schema.ignorePaths,
12
12
  skipFormat: true,
13
13
  interactionTests: schema.interactionTests ?? true,
14
14
  });
15
15
  }
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) {
16
+ async function storybookConfigurationGenerator(host, schema) {
24
17
  const { configurationGenerator } = (0, devkit_1.ensurePackage)('@nx/storybook', versions_1.nxVersion);
25
18
  const installTask = await configurationGenerator(host, {
26
- project: schema.project,
19
+ name: schema.name,
27
20
  js: schema.js,
28
21
  linter: schema.linter,
29
- tsConfiguration: schema.tsConfiguration ?? true, // default is true
30
- interactionTests: schema.interactionTests ?? true, // default is true
22
+ tsConfiguration: schema.tsConfiguration ?? true,
23
+ interactionTests: schema.interactionTests ?? true,
31
24
  configureStaticServe: schema.configureStaticServe,
32
25
  uiFramework: '@storybook/vue3-vite',
33
26
  skipFormat: true,
34
- addPlugin: schema.addPlugin,
35
27
  });
36
28
  if (schema.generateStories) {
37
29
  await generateStories(host, schema);
@@ -39,5 +31,5 @@ async function storybookConfigurationGeneratorInternal(host, schema) {
39
31
  await (0, devkit_1.formatFiles)(host);
40
32
  return installTask;
41
33
  }
42
- exports.storybookConfigurationGeneratorInternal = storybookConfigurationGeneratorInternal;
34
+ exports.storybookConfigurationGenerator = storybookConfigurationGenerator;
43
35
  exports.default = storybookConfigurationGenerator;
@@ -1,7 +1,7 @@
1
1
  import { Linter } from '@nx/eslint';
2
2
 
3
3
  export interface StorybookConfigureSchema {
4
- project: string;
4
+ name: string;
5
5
  interactionTests?: boolean;
6
6
  generateStories?: boolean;
7
7
  js?: boolean;
@@ -9,5 +9,4 @@ export interface StorybookConfigureSchema {
9
9
  linter?: Linter;
10
10
  ignorePaths?: string[];
11
11
  configureStaticServe?: boolean;
12
- addPlugin?: boolean;
13
12
  }
@@ -1,14 +1,14 @@
1
1
  {
2
- "$schema": "https://json-schema.org/schema",
2
+ "$schema": "http://json-schema.org/schema",
3
3
  "cli": "nx",
4
4
  "$id": "NxVueStorybookConfigure",
5
5
  "title": "Vue Storybook Configure",
6
6
  "description": "Set up Storybook for a Vue project.",
7
7
  "type": "object",
8
8
  "properties": {
9
- "project": {
9
+ "name": {
10
10
  "type": "string",
11
- "aliases": ["name", "projectName"],
11
+ "aliases": ["project", "projectName"],
12
12
  "description": "Project for which to generate Storybook configuration.",
13
13
  "$default": {
14
14
  "$source": "argv",
@@ -75,6 +75,6 @@
75
75
  ]
76
76
  }
77
77
  },
78
- "required": ["project"],
78
+ "required": ["name"],
79
79
  "examplesFile": "../../../docs/storybook-configuration-examples.md"
80
80
  }
@@ -8,6 +8,5 @@ export declare function addLinting(host: Tree, options: {
8
8
  setParserOptionsProject?: boolean;
9
9
  skipPackageJson?: boolean;
10
10
  rootProject?: boolean;
11
- addPlugin?: boolean;
12
11
  }, projectType: 'lib' | 'app'): Promise<import("@nx/devkit").GeneratorCallback>;
13
12
  export declare function editEslintConfigFiles(tree: Tree, projectRoot: string, rootProject?: boolean): void;
@@ -6,6 +6,7 @@ const path_1 = require("nx/src/utils/path");
6
6
  const devkit_1 = require("@nx/devkit");
7
7
  const lint_1 = require("./lint");
8
8
  const eslint_file_1 = require("@nx/eslint/src/generators/utils/eslint-file");
9
+ const lint_project_1 = require("@nx/eslint/src/generators/lint-project/lint-project");
9
10
  async function addLinting(host, options, projectType) {
10
11
  if (options.linter === eslint_1.Linter.EsLint) {
11
12
  const lintTask = await (0, eslint_1.lintProjectGenerator)(host, {
@@ -15,10 +16,12 @@ async function addLinting(host, options, projectType) {
15
16
  (0, path_1.joinPathFragments)(options.projectRoot, `tsconfig.${projectType}.json`),
16
17
  ],
17
18
  unitTestRunner: options.unitTestRunner,
19
+ eslintFilePatterns: [
20
+ (0, lint_project_1.mapLintPattern)(options.projectRoot, '{ts,tsx,js,jsx,vue}', options.rootProject),
21
+ ],
18
22
  skipFormat: true,
19
23
  setParserOptionsProject: options.setParserOptionsProject,
20
24
  rootProject: options.rootProject,
21
- addPlugin: options.addPlugin,
22
25
  });
23
26
  if ((0, eslint_file_1.isEslintConfigSupported)(host)) {
24
27
  (0, eslint_file_1.addExtendsToLintConfig)(host, options.projectRoot, [
@@ -2,8 +2,9 @@ export declare const nxVersion: any;
2
2
  export declare const vueVersion = "^3.3.4";
3
3
  export declare const vueTscVersion = "^1.8.8";
4
4
  export declare const vueRouterVersion = "^4.2.4";
5
+ export declare const vueTsconfigVersion = "^0.4.0";
5
6
  export declare const vueTestUtilsVersion = "^2.4.1";
6
- export declare const vitePluginVueVersion = "^4.5.0";
7
+ export declare const vitePluginVueVersion = "^4.3.1";
7
8
  export declare const vueEslintConfigPrettierVersion = "7.1.0";
8
9
  export declare const vueEslintConfigTypescriptVersion = "^11.0.3";
9
10
  export declare const eslintPluginVueVersion = "^9.16.1";
@@ -1,14 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.lessVersion = exports.sassVersion = exports.autoprefixerVersion = exports.tailwindcssVersion = exports.postcssVersion = exports.eslintPluginVueVersion = exports.vueEslintConfigTypescriptVersion = exports.vueEslintConfigPrettierVersion = exports.vitePluginVueVersion = exports.vueTestUtilsVersion = exports.vueRouterVersion = exports.vueTscVersion = exports.vueVersion = exports.nxVersion = void 0;
3
+ exports.lessVersion = exports.sassVersion = exports.autoprefixerVersion = exports.tailwindcssVersion = exports.postcssVersion = exports.eslintPluginVueVersion = exports.vueEslintConfigTypescriptVersion = exports.vueEslintConfigPrettierVersion = exports.vitePluginVueVersion = exports.vueTestUtilsVersion = exports.vueTsconfigVersion = exports.vueRouterVersion = exports.vueTscVersion = exports.vueVersion = exports.nxVersion = void 0;
4
4
  exports.nxVersion = require('../../package.json').version;
5
5
  // vue core
6
6
  exports.vueVersion = '^3.3.4';
7
7
  exports.vueTscVersion = '^1.8.8';
8
8
  exports.vueRouterVersion = '^4.2.4';
9
+ // build deps
10
+ exports.vueTsconfigVersion = '^0.4.0';
9
11
  // test deps
10
12
  exports.vueTestUtilsVersion = '^2.4.1';
11
- exports.vitePluginVueVersion = '^4.5.0';
13
+ exports.vitePluginVueVersion = '^4.3.1';
12
14
  // linting deps
13
15
  exports.vueEslintConfigPrettierVersion = '7.1.0';
14
16
  exports.vueEslintConfigTypescriptVersion = '^11.0.3';
@@ -1,6 +0,0 @@
1
- import { type GeneratorCallback, type Tree } from '@nx/devkit';
2
- export type EnsureDependenciesOptions = {
3
- routing?: boolean;
4
- style?: 'scss' | 'less' | 'none' | 'css';
5
- };
6
- export declare function ensureDependencies(tree: Tree, options: EnsureDependenciesOptions): GeneratorCallback;
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ensureDependencies = void 0;
4
- const devkit_1 = require("@nx/devkit");
5
- const versions_1 = require("./versions");
6
- function ensureDependencies(tree, options) {
7
- const dependencies = {};
8
- const devDependencies = {
9
- '@vue/test-utils': versions_1.vueTestUtilsVersion,
10
- '@vitejs/plugin-vue': versions_1.vitePluginVueVersion,
11
- 'vue-tsc': versions_1.vueTscVersion,
12
- };
13
- if (options.routing) {
14
- dependencies['vue-router'] = versions_1.vueRouterVersion;
15
- }
16
- if (options.style === 'scss') {
17
- devDependencies['sass'] = versions_1.sassVersion;
18
- }
19
- else if (options.style === 'less') {
20
- devDependencies['less'] = versions_1.lessVersion;
21
- }
22
- return (0, devkit_1.addDependenciesToPackageJson)(tree, dependencies, devDependencies);
23
- }
24
- exports.ensureDependencies = ensureDependencies;