@nx/vue 23.0.0-beta.0 → 23.0.0-beta.10
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 +0 -6
- package/index.d.ts +0 -2
- package/index.d.ts.map +1 -1
- package/index.js +1 -3
- package/package.json +12 -12
- package/src/generators/application/application.d.ts.map +1 -1
- package/src/generators/application/application.js +2 -2
- package/src/generators/application/lib/add-e2e.d.ts.map +1 -1
- package/src/generators/application/lib/add-rsbuild.d.ts.map +1 -1
- package/src/generators/application/lib/add-rsbuild.js +0 -4
- package/src/generators/application/lib/normalize-options.js +3 -3
- package/src/generators/application/schema.d.ts +1 -1
- package/src/generators/application/schema.json +2 -5
- package/src/generators/component/lib/utils.d.ts.map +1 -1
- package/src/generators/component/lib/utils.js +2 -2
- package/src/generators/library/lib/normalize-options.d.ts.map +1 -1
- package/src/generators/library/lib/normalize-options.js +3 -3
- package/src/generators/library/library.d.ts.map +1 -1
- package/src/generators/library/library.js +3 -4
- package/src/utils/ensure-dependencies.d.ts +1 -1
- package/src/utils/ensure-dependencies.d.ts.map +1 -1
- package/src/utils/ensure-dependencies.js +0 -3
- package/src/utils/versions.d.ts +1 -3
- package/src/utils/versions.d.ts.map +1 -1
- package/src/utils/versions.js +2 -5
- package/tailwind.d.ts +2 -3
- package/tailwind.d.ts.map +1 -1
- package/tailwind.js +10 -4
- package/src/generators/setup-tailwind/files/postcss.config.js.template +0 -10
- package/src/generators/setup-tailwind/files/tailwind.config.js.template +0 -18
- package/src/generators/setup-tailwind/lib/add-tailwind-style-imports.d.ts +0 -4
- package/src/generators/setup-tailwind/lib/add-tailwind-style-imports.d.ts.map +0 -1
- package/src/generators/setup-tailwind/lib/add-tailwind-style-imports.js +0 -31
- package/src/generators/setup-tailwind/schema.d.ts +0 -6
- package/src/generators/setup-tailwind/schema.json +0 -45
- package/src/generators/setup-tailwind/setup-tailwind.d.ts +0 -5
- package/src/generators/setup-tailwind/setup-tailwind.d.ts.map +0 -1
- package/src/generators/setup-tailwind/setup-tailwind.js +0 -25
package/generators.json
CHANGED
|
@@ -29,12 +29,6 @@
|
|
|
29
29
|
"x-type": "component",
|
|
30
30
|
"description": "Create a Vue component."
|
|
31
31
|
},
|
|
32
|
-
"setup-tailwind": {
|
|
33
|
-
"factory": "./src/generators/setup-tailwind/setup-tailwind",
|
|
34
|
-
"schema": "./src/generators/setup-tailwind/schema.json",
|
|
35
|
-
"description": "Set up Tailwind configuration for a project.",
|
|
36
|
-
"x-deprecated": "Generating Tailwind configuration is no longer maintained. This generator will be removed in Nx 23."
|
|
37
|
-
},
|
|
38
32
|
"storybook-configuration": {
|
|
39
33
|
"factory": "./src/generators/storybook-configuration/configuration#storybookConfigurationGeneratorInternal",
|
|
40
34
|
"schema": "./src/generators/storybook-configuration/schema.json",
|
package/index.d.ts
CHANGED
|
@@ -5,8 +5,6 @@ export { componentGenerator } from './src/generators/component/component';
|
|
|
5
5
|
export { ComponentGeneratorSchema } from './src/generators/component/schema';
|
|
6
6
|
export { storybookConfigurationGenerator } from './src/generators/storybook-configuration/configuration';
|
|
7
7
|
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
8
|
export { type InitSchema } from './src/generators/init/schema';
|
|
11
9
|
export { vueInitGenerator } from './src/generators/init/init';
|
|
12
10
|
export * from './src/utils/versions';
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/vue/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,+BAA+B,EAAE,MAAM,wDAAwD,CAAC;AACzG,OAAO,EACL,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/vue/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,+BAA+B,EAAE,MAAM,wDAAwD,CAAC;AACzG,OAAO,EACL,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC"}
|
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.vueInitGenerator = exports.
|
|
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/vue",
|
|
3
|
-
"version": "23.0.0-beta.
|
|
3
|
+
"version": "23.0.0-beta.10",
|
|
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, Playwright, 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,27 +30,27 @@
|
|
|
30
30
|
"migrations": "./migrations.json"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@nx/devkit": "23.0.0-beta.
|
|
34
|
-
"@nx/eslint": "23.0.0-beta.
|
|
35
|
-
"@nx/js": "23.0.0-beta.
|
|
36
|
-
"@nx/vite": "23.0.0-beta.
|
|
37
|
-
"@nx/vitest": "23.0.0-beta.
|
|
38
|
-
"@nx/web": "23.0.0-beta.
|
|
33
|
+
"@nx/devkit": "23.0.0-beta.10",
|
|
34
|
+
"@nx/eslint": "23.0.0-beta.10",
|
|
35
|
+
"@nx/js": "23.0.0-beta.10",
|
|
36
|
+
"@nx/vite": "23.0.0-beta.10",
|
|
37
|
+
"@nx/vitest": "23.0.0-beta.10",
|
|
38
|
+
"@nx/web": "23.0.0-beta.10",
|
|
39
39
|
"picomatch": "4.0.4",
|
|
40
40
|
"semver": "^7.6.3",
|
|
41
41
|
"tslib": "^2.3.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"nx": "23.0.0-beta.
|
|
44
|
+
"nx": "23.0.0-beta.10"
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@nx/cypress": "23.0.0-beta.
|
|
51
|
-
"@nx/playwright": "23.0.0-beta.
|
|
52
|
-
"@nx/rsbuild": "23.0.0-beta.
|
|
53
|
-
"@nx/storybook": "23.0.0-beta.
|
|
50
|
+
"@nx/cypress": "23.0.0-beta.10",
|
|
51
|
+
"@nx/playwright": "23.0.0-beta.10",
|
|
52
|
+
"@nx/rsbuild": "23.0.0-beta.10",
|
|
53
|
+
"@nx/storybook": "23.0.0-beta.10"
|
|
54
54
|
},
|
|
55
55
|
"peerDependenciesMeta": {
|
|
56
56
|
"@nx/cypress": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../../../../../../packages/vue/src/generators/application/application.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../../../../../../packages/vue/src/generators/application/application.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,iBAAiB,EAKjB,IAAI,EAEL,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAkBlC,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,8BAM/D;AAED,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,iBAAiB,CAAC,CA0I5B;AAED,eAAe,oBAAoB,CAAC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.applicationGenerator = applicationGenerator;
|
|
4
4
|
exports.applicationGeneratorInternal = applicationGeneratorInternal;
|
|
5
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
5
6
|
const devkit_1 = require("@nx/devkit");
|
|
6
7
|
const js_1 = require("@nx/js");
|
|
7
8
|
const normalize_options_1 = require("./lib/normalize-options");
|
|
@@ -13,7 +14,6 @@ const add_vite_1 = require("./lib/add-vite");
|
|
|
13
14
|
const add_rsbuild_1 = require("./lib/add-rsbuild");
|
|
14
15
|
const create_ts_config_1 = require("../../utils/create-ts-config");
|
|
15
16
|
const ensure_dependencies_1 = require("../../utils/ensure-dependencies");
|
|
16
|
-
const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
|
|
17
17
|
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
|
18
18
|
const sort_fields_1 = require("@nx/js/src/utils/package-json/sort-fields");
|
|
19
19
|
function applicationGenerator(tree, options) {
|
|
@@ -119,7 +119,7 @@ async function applicationGeneratorInternal(tree, _options) {
|
|
|
119
119
|
if (!options.skipFormat)
|
|
120
120
|
await (0, devkit_1.formatFiles)(tree);
|
|
121
121
|
tasks.push(() => {
|
|
122
|
-
(0,
|
|
122
|
+
(0, internal_1.logShowProjectCommand)(options.projectName);
|
|
123
123
|
});
|
|
124
124
|
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
125
125
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-e2e.d.ts","sourceRoot":"","sources":["../../../../../../../packages/vue/src/generators/application/lib/add-e2e.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"add-e2e.d.ts","sourceRoot":"","sources":["../../../../../../../packages/vue/src/generators/application/lib/add-e2e.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAa1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAG7C,wBAAsB,MAAM,CAC1B,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,iBAAiB,CAAC,CA4J5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-rsbuild.d.ts","sourceRoot":"","sources":["../../../../../../../packages/vue/src/generators/application/lib/add-rsbuild.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,IAAI,EACT,KAAK,iBAAiB,EAIvB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAG7C,wBAAsB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"add-rsbuild.d.ts","sourceRoot":"","sources":["../../../../../../../packages/vue/src/generators/application/lib/add-rsbuild.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,IAAI,EACT,KAAK,iBAAiB,EAIvB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAG7C,wBAAsB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,gCAgDrE"}
|
|
@@ -62,10 +62,6 @@ async function addRsbuild(tree, options) {
|
|
|
62
62
|
addBuildPlugin(tree, pathToConfigFile, '@rsbuild/plugin-sass', 'pluginSass');
|
|
63
63
|
deps['@rsbuild/plugin-sass'] = versions.rsbuildPluginSassVersion;
|
|
64
64
|
}
|
|
65
|
-
else if (options.style === 'less') {
|
|
66
|
-
addBuildPlugin(tree, pathToConfigFile, '@rsbuild/plugin-less', 'pluginLess');
|
|
67
|
-
deps['@rsbuild/plugin-less'] = versions.rsbuildPluginLessVersion;
|
|
68
|
-
}
|
|
69
65
|
addHtmlTemplatePath(tree, pathToConfigFile, './index.html');
|
|
70
66
|
tasks.push((0, devkit_1.addDependenciesToPackageJson)(tree, {}, deps));
|
|
71
67
|
return tasks;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.normalizeOptions = normalizeOptions;
|
|
4
|
-
const
|
|
4
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
5
5
|
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
|
6
6
|
async function normalizeOptions(host, options) {
|
|
7
|
-
await (0,
|
|
8
|
-
const { projectName, projectRoot: appProjectRoot, importPath, } = await (0,
|
|
7
|
+
await (0, internal_1.ensureRootProjectName)(options, 'application');
|
|
8
|
+
const { projectName, projectRoot: appProjectRoot, importPath, } = await (0, internal_1.determineProjectNameAndRootOptions)(host, {
|
|
9
9
|
name: options.name,
|
|
10
10
|
projectType: 'application',
|
|
11
11
|
directory: options.directory,
|
|
@@ -3,7 +3,7 @@ import type { Linter, LinterType } from '@nx/eslint';
|
|
|
3
3
|
export interface Schema {
|
|
4
4
|
directory: string;
|
|
5
5
|
name?: string;
|
|
6
|
-
style: 'none' | 'css' | 'scss'
|
|
6
|
+
style: 'none' | 'css' | 'scss';
|
|
7
7
|
bundler?: 'vite' | 'rsbuild';
|
|
8
8
|
skipFormat?: boolean;
|
|
9
9
|
tags?: string;
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"type": "string",
|
|
38
38
|
"default": "css",
|
|
39
39
|
"alias": "s",
|
|
40
|
+
"enum": ["css", "scss", "none"],
|
|
40
41
|
"x-prompt": {
|
|
41
42
|
"message": "Which stylesheet format would you like to use?",
|
|
42
43
|
"type": "list",
|
|
@@ -47,11 +48,7 @@
|
|
|
47
48
|
},
|
|
48
49
|
{
|
|
49
50
|
"value": "scss",
|
|
50
|
-
"label": "SASS(.scss) [ https://sass-lang.com
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
"value": "less",
|
|
54
|
-
"label": "LESS [ https://lesscss.org ]"
|
|
51
|
+
"label": "SASS(.scss) [ https://sass-lang.com ]"
|
|
55
52
|
},
|
|
56
53
|
{
|
|
57
54
|
"value": "none",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../../packages/vue/src/generators/component/lib/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../../packages/vue/src/generators/component/lib/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAML,IAAI,EACL,MAAM,YAAY,CAAC;AAIpB,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAMvE,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,gBAAgB,CAAC,CAsC3B;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,QAqCvE"}
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.normalizeOptions = normalizeOptions;
|
|
4
4
|
exports.addExportsToBarrel = addExportsToBarrel;
|
|
5
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
5
6
|
const devkit_1 = require("@nx/devkit");
|
|
6
7
|
const path_1 = require("path");
|
|
7
8
|
const ensure_typescript_1 = require("@nx/js/src/utils/typescript/ensure-typescript");
|
|
8
|
-
const artifact_name_and_directory_utils_1 = require("@nx/devkit/src/generators/artifact-name-and-directory-utils");
|
|
9
9
|
const ast_utils_1 = require("../../../utils/ast-utils");
|
|
10
10
|
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
|
11
11
|
let tsModule;
|
|
12
12
|
async function normalizeOptions(host, options) {
|
|
13
|
-
const { fileName, filePath, directory, project: projectName, } = await (0,
|
|
13
|
+
const { fileName, filePath, directory, project: projectName, } = await (0, internal_1.determineArtifactNameAndDirectoryOptions)(host, {
|
|
14
14
|
path: options.path,
|
|
15
15
|
allowedFileExtensions: ['vue'],
|
|
16
16
|
fileExtension: 'vue',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalize-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/vue/src/generators/library/lib/normalize-options.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"normalize-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/vue/src/generators/library/lib/normalize-options.ts"],"names":[],"mappings":"AAIA,OAAO,EAKL,IAAI,EACL,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAOrD,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,gBAAgB,CAAC,CAuF3B"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.normalizeOptions = normalizeOptions;
|
|
4
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
4
5
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
|
|
6
6
|
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
|
7
7
|
async function normalizeOptions(host, options) {
|
|
8
|
-
await (0,
|
|
9
|
-
const { projectName, names: projectNames, projectRoot, importPath, } = await (0,
|
|
8
|
+
await (0, internal_1.ensureRootProjectName)(options, 'library');
|
|
9
|
+
const { projectName, names: projectNames, projectRoot, importPath, } = await (0, internal_1.determineProjectNameAndRootOptions)(host, {
|
|
10
10
|
name: options.name,
|
|
11
11
|
projectType: 'library',
|
|
12
12
|
directory: options.directory,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../../../../../packages/vue/src/generators/library/library.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../../../../../packages/vue/src/generators/library/library.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,iBAAiB,EAOjB,IAAI,EAGL,MAAM,YAAY,CAAC;AAwBpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAM1D;AAED,wBAAsB,wBAAwB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAoKxE;AAED,eAAe,gBAAgB,CAAC"}
|
|
@@ -3,9 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.libraryGenerator = libraryGenerator;
|
|
4
4
|
exports.libraryGeneratorInternal = libraryGeneratorInternal;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
6
7
|
const devkit_1 = require("@nx/devkit");
|
|
7
|
-
const artifact_name_and_directory_utils_1 = require("@nx/devkit/src/generators/artifact-name-and-directory-utils");
|
|
8
|
-
const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
|
|
9
8
|
const js_1 = require("@nx/js");
|
|
10
9
|
const add_release_config_1 = require("@nx/js/src/generators/library/utils/add-release-config");
|
|
11
10
|
const sort_fields_1 = require("@nx/js/src/utils/package-json/sort-fields");
|
|
@@ -86,7 +85,7 @@ async function libraryGeneratorInternal(tree, schema) {
|
|
|
86
85
|
(0, create_library_files_1.createLibraryFiles)(tree, options);
|
|
87
86
|
tasks.push(await (0, add_vite_1.addVite)(tree, options));
|
|
88
87
|
if (options.component) {
|
|
89
|
-
const relativeCwd = (0,
|
|
88
|
+
const relativeCwd = (0, internal_1.getRelativeCwd)();
|
|
90
89
|
const path = (0, devkit_1.joinPathFragments)(options.projectRoot, 'src/lib', options.fileName);
|
|
91
90
|
await (0, component_1.default)(tree, {
|
|
92
91
|
path: relativeCwd ? (0, path_1.relative)(relativeCwd, path) : path,
|
|
@@ -137,7 +136,7 @@ async function libraryGeneratorInternal(tree, schema) {
|
|
|
137
136
|
tasks.push(() => (0, devkit_1.installPackagesTask)(tree, true));
|
|
138
137
|
}
|
|
139
138
|
tasks.push(() => {
|
|
140
|
-
(0,
|
|
139
|
+
(0, internal_1.logShowProjectCommand)(options.name);
|
|
141
140
|
});
|
|
142
141
|
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
143
142
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type GeneratorCallback, type Tree } from '@nx/devkit';
|
|
2
2
|
export type EnsureDependenciesOptions = {
|
|
3
3
|
routing?: boolean;
|
|
4
|
-
style?: 'scss' | '
|
|
4
|
+
style?: 'scss' | 'none' | 'css';
|
|
5
5
|
};
|
|
6
6
|
export declare function ensureDependencies(tree: Tree, options: EnsureDependenciesOptions): GeneratorCallback;
|
|
7
7
|
//# sourceMappingURL=ensure-dependencies.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ensure-dependencies.d.ts","sourceRoot":"","sources":["../../../../../packages/vue/src/utils/ensure-dependencies.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"ensure-dependencies.d.ts","sourceRoot":"","sources":["../../../../../packages/vue/src/utils/ensure-dependencies.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AASpB,MAAM,MAAM,yBAAyB,GAAG;IACtC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC;CACjC,CAAC;AAEF,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,yBAAyB,GACjC,iBAAiB,CAiBnB"}
|
|
@@ -16,8 +16,5 @@ function ensureDependencies(tree, options) {
|
|
|
16
16
|
if (options.style === 'scss') {
|
|
17
17
|
devDependencies['sass'] = versions_1.sassVersion;
|
|
18
18
|
}
|
|
19
|
-
else if (options.style === 'less') {
|
|
20
|
-
devDependencies['less'] = versions_1.lessVersion;
|
|
21
|
-
}
|
|
22
19
|
return (0, devkit_1.addDependenciesToPackageJson)(tree, dependencies, devDependencies);
|
|
23
20
|
}
|
package/src/utils/versions.d.ts
CHANGED
|
@@ -9,8 +9,6 @@ export declare const vueEslintConfigTypescriptVersion = "^11.0.3";
|
|
|
9
9
|
export declare const eslint9__VueEslintConfigTypescriptVersion = "^14.6.0";
|
|
10
10
|
export declare const eslintPluginVueVersion = "^9.16.1";
|
|
11
11
|
export declare const postcssVersion = "8.4.21";
|
|
12
|
-
export declare const tailwindcssVersion = "3.2.7";
|
|
13
12
|
export declare const autoprefixerVersion = "10.4.13";
|
|
14
|
-
export declare const sassVersion = "^1.
|
|
15
|
-
export declare const lessVersion = "3.12.2";
|
|
13
|
+
export declare const sassVersion = "^1.97.2";
|
|
16
14
|
//# sourceMappingURL=versions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versions.d.ts","sourceRoot":"","sources":["../../../../../packages/vue/src/utils/versions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,KAAwC,CAAC;AAG/D,eAAO,MAAM,UAAU,YAAY,CAAC;AACpC,eAAO,MAAM,aAAa,WAAW,CAAC;AACtC,eAAO,MAAM,gBAAgB,WAAW,CAAC;AAGzC,eAAO,MAAM,mBAAmB,WAAW,CAAC;AAC5C,eAAO,MAAM,oBAAoB,WAAW,CAAC;AAG7C,eAAO,MAAM,8BAA8B,YAAY,CAAC;AACxD,eAAO,MAAM,gCAAgC,YAAY,CAAC;AAC1D,eAAO,MAAM,yCAAyC,YAAY,CAAC;AACnE,eAAO,MAAM,sBAAsB,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"versions.d.ts","sourceRoot":"","sources":["../../../../../packages/vue/src/utils/versions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,KAAwC,CAAC;AAG/D,eAAO,MAAM,UAAU,YAAY,CAAC;AACpC,eAAO,MAAM,aAAa,WAAW,CAAC;AACtC,eAAO,MAAM,gBAAgB,WAAW,CAAC;AAGzC,eAAO,MAAM,mBAAmB,WAAW,CAAC;AAC5C,eAAO,MAAM,oBAAoB,WAAW,CAAC;AAG7C,eAAO,MAAM,8BAA8B,YAAY,CAAC;AACxD,eAAO,MAAM,gCAAgC,YAAY,CAAC;AAC1D,eAAO,MAAM,yCAAyC,YAAY,CAAC;AACnE,eAAO,MAAM,sBAAsB,YAAY,CAAC;AAEhD,eAAO,MAAM,cAAc,WAAW,CAAC;AACvC,eAAO,MAAM,mBAAmB,YAAY,CAAC;AAG7C,eAAO,MAAM,WAAW,YAAY,CAAC"}
|
package/src/utils/versions.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.sassVersion = exports.autoprefixerVersion = exports.postcssVersion = exports.eslintPluginVueVersion = exports.eslint9__VueEslintConfigTypescriptVersion = exports.vueEslintConfigTypescriptVersion = exports.vueEslintConfigPrettierVersion = exports.vitePluginVueVersion = exports.vueTestUtilsVersion = 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.5.13';
|
|
@@ -14,10 +14,7 @@ exports.vueEslintConfigPrettierVersion = '^10.2.0';
|
|
|
14
14
|
exports.vueEslintConfigTypescriptVersion = '^11.0.3';
|
|
15
15
|
exports.eslint9__VueEslintConfigTypescriptVersion = '^14.6.0';
|
|
16
16
|
exports.eslintPluginVueVersion = '^9.16.1';
|
|
17
|
-
// tailwindcss
|
|
18
17
|
exports.postcssVersion = '8.4.21';
|
|
19
|
-
exports.tailwindcssVersion = '3.2.7';
|
|
20
18
|
exports.autoprefixerVersion = '10.4.13';
|
|
21
19
|
// other deps
|
|
22
|
-
exports.sassVersion = '^1.
|
|
23
|
-
exports.lessVersion = '3.12.2';
|
|
20
|
+
exports.sassVersion = '^1.97.2';
|
package/tailwind.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* @param fileGlobPattern pass a custom glob pattern to be used
|
|
2
|
+
* @deprecated `@nx/vue/tailwind` will be removed in Nx 24. Migrate to Tailwind CSS v4 which no longer needs glob patterns.
|
|
3
|
+
* See: https://nx.dev/docs/technologies/vue/guides/using-tailwind-css-in-vue
|
|
5
4
|
*/
|
|
6
5
|
export declare function createGlobPatternsForDependencies(dirPath: string, fileGlobPattern?: string): string[];
|
|
7
6
|
//# sourceMappingURL=tailwind.d.ts.map
|
package/tailwind.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tailwind.d.ts","sourceRoot":"","sources":["../../../packages/vue/tailwind.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tailwind.d.ts","sourceRoot":"","sources":["../../../packages/vue/tailwind.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,wBAAgB,iCAAiC,CAC/C,OAAO,EAAE,MAAM,EACf,eAAe,GAAE,MAAsD,YA4BxE"}
|
package/tailwind.js
CHANGED
|
@@ -2,12 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createGlobPatternsForDependencies = createGlobPatternsForDependencies;
|
|
4
4
|
const generate_globs_1 = require("@nx/js/src/utils/generate-globs");
|
|
5
|
+
let hasWarned = false;
|
|
5
6
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* @param fileGlobPattern pass a custom glob pattern to be used
|
|
7
|
+
* @deprecated `@nx/vue/tailwind` will be removed in Nx 24. Migrate to Tailwind CSS v4 which no longer needs glob patterns.
|
|
8
|
+
* See: https://nx.dev/docs/technologies/vue/guides/using-tailwind-css-in-vue
|
|
9
9
|
*/
|
|
10
|
-
function createGlobPatternsForDependencies(dirPath, fileGlobPattern = '
|
|
10
|
+
function createGlobPatternsForDependencies(dirPath, fileGlobPattern = '/**/!(*.stories|*.spec).{vue,tsx,ts,jsx,js}') {
|
|
11
|
+
if (!hasWarned) {
|
|
12
|
+
hasWarned = true;
|
|
13
|
+
console.warn(`\nWARNING: "@nx/vue/tailwind" is deprecated and will be removed in Nx 24.\n` +
|
|
14
|
+
`Migrate to Tailwind CSS v4 which no longer needs glob patterns for content detection.\n` +
|
|
15
|
+
`See: https://nx.dev/docs/technologies/vue/guides/using-tailwind-css-in-vue\n`);
|
|
16
|
+
}
|
|
11
17
|
try {
|
|
12
18
|
return (0, generate_globs_1.createGlobPatternsForDependencies)(dirPath, fileGlobPattern);
|
|
13
19
|
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
const { createGlobPatternsForDependencies } = require('@nx/vue/tailwind');
|
|
2
|
-
const { join } = require('path');
|
|
3
|
-
|
|
4
|
-
/** @type {import('tailwindcss').Config} */
|
|
5
|
-
module.exports = {
|
|
6
|
-
content: [
|
|
7
|
-
join(__dirname, 'index.html'),
|
|
8
|
-
join(
|
|
9
|
-
__dirname,
|
|
10
|
-
'src/**/*!(*.stories|*.spec).{vue,ts,tsx,js,jsx}'
|
|
11
|
-
),
|
|
12
|
-
...createGlobPatternsForDependencies(__dirname),
|
|
13
|
-
],
|
|
14
|
-
theme: {
|
|
15
|
-
extend: {},
|
|
16
|
-
},
|
|
17
|
-
plugins: [],
|
|
18
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { ProjectConfiguration, Tree } from '@nx/devkit';
|
|
2
|
-
import { SetupTailwindOptions } from '../schema';
|
|
3
|
-
export declare function addTailwindStyleImports(tree: Tree, project: ProjectConfiguration, _options: SetupTailwindOptions): void;
|
|
4
|
-
//# sourceMappingURL=add-tailwind-style-imports.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"add-tailwind-style-imports.d.ts","sourceRoot":"","sources":["../../../../../../../packages/vue/src/generators/setup-tailwind/lib/add-tailwind-style-imports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,oBAAoB,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAE3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAmBjD,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,oBAAoB,EAC7B,QAAQ,EAAE,oBAAoB,QAqB/B"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addTailwindStyleImports = addTailwindStyleImports;
|
|
4
|
-
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const knownStylesheetLocations = [
|
|
6
|
-
// What we generate by default
|
|
7
|
-
'src/styles.css',
|
|
8
|
-
'src/styles.scss',
|
|
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
|
-
// Other common locations (e.g. what `npm create vue` does)
|
|
15
|
-
'src/assets/styles.css',
|
|
16
|
-
'src/assets/styles.scss',
|
|
17
|
-
'src/assets/styles.less',
|
|
18
|
-
];
|
|
19
|
-
function addTailwindStyleImports(tree, project, _options) {
|
|
20
|
-
if (_options.stylesheet) {
|
|
21
|
-
knownStylesheetLocations.push(_options.stylesheet);
|
|
22
|
-
}
|
|
23
|
-
const stylesPath = knownStylesheetLocations
|
|
24
|
-
.map((file) => (0, devkit_1.joinPathFragments)(project.root, file))
|
|
25
|
-
.find((file) => tree.exists(file));
|
|
26
|
-
if (!stylesPath) {
|
|
27
|
-
throw new Error(`Could not find the stylesheet to update. Use --stylesheet to specify this path (relative to the workspace root).`);
|
|
28
|
-
}
|
|
29
|
-
const content = tree.read(stylesPath).toString();
|
|
30
|
-
tree.write(stylesPath, `@tailwind base;\n@tailwind components;\n@tailwind utilities;\n${content}`);
|
|
31
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/schema",
|
|
3
|
-
"cli": "nx",
|
|
4
|
-
"$id": "NxVueTailwindSetupGenerator",
|
|
5
|
-
"title": "Configures Tailwind CSS for an application or a library.",
|
|
6
|
-
"description": "Adds the Tailwind CSS configuration files for a given Vue project and installs, if needed, the packages required for Tailwind CSS to work.",
|
|
7
|
-
"type": "object",
|
|
8
|
-
"examples": [
|
|
9
|
-
{
|
|
10
|
-
"command": "nx g setup-tailwind --project=my-app",
|
|
11
|
-
"description": "Initialize Tailwind configuration for the `my-app` project."
|
|
12
|
-
}
|
|
13
|
-
],
|
|
14
|
-
"properties": {
|
|
15
|
-
"project": {
|
|
16
|
-
"type": "string",
|
|
17
|
-
"description": "The name of the project to add the Tailwind CSS setup for.",
|
|
18
|
-
"alias": "p",
|
|
19
|
-
"$default": {
|
|
20
|
-
"$source": "argv",
|
|
21
|
-
"index": 0
|
|
22
|
-
},
|
|
23
|
-
"x-dropdown": "projects",
|
|
24
|
-
"x-prompt": "What project would you like to add the Tailwind CSS setup?",
|
|
25
|
-
"x-priority": "important"
|
|
26
|
-
},
|
|
27
|
-
"skipFormat": {
|
|
28
|
-
"type": "boolean",
|
|
29
|
-
"description": "Skips formatting the workspace after the generator completes.",
|
|
30
|
-
"x-priority": "internal"
|
|
31
|
-
},
|
|
32
|
-
"skipPackageJson": {
|
|
33
|
-
"type": "boolean",
|
|
34
|
-
"default": false,
|
|
35
|
-
"description": "Do not add dependencies to `package.json`.",
|
|
36
|
-
"x-priority": "internal"
|
|
37
|
-
},
|
|
38
|
-
"stylesheet": {
|
|
39
|
-
"type": "string",
|
|
40
|
-
"description": "Path to the styles entry point relative to the workspace root. This option is only needed if the stylesheet location cannot be found automatically."
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
"additionalProperties": false,
|
|
44
|
-
"required": ["project"]
|
|
45
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { GeneratorCallback, Tree } from '@nx/devkit';
|
|
2
|
-
import type { SetupTailwindOptions } from './schema';
|
|
3
|
-
export declare function setupTailwindGenerator(tree: Tree, options: SetupTailwindOptions): Promise<void | GeneratorCallback>;
|
|
4
|
-
export default setupTailwindGenerator;
|
|
5
|
-
//# sourceMappingURL=setup-tailwind.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setup-tailwind.d.ts","sourceRoot":"","sources":["../../../../../../packages/vue/src/generators/setup-tailwind/setup-tailwind.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAc1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAIrD,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,IAAI,GAAG,iBAAiB,CAAC,CA2BnC;AAED,eAAe,sBAAsB,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setupTailwindGenerator = setupTailwindGenerator;
|
|
4
|
-
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const versions_1 = require("../../utils/versions");
|
|
6
|
-
const add_tailwind_style_imports_1 = require("./lib/add-tailwind-style-imports");
|
|
7
|
-
const path_1 = require("path");
|
|
8
|
-
async function setupTailwindGenerator(tree, options) {
|
|
9
|
-
devkit_1.logger.warn(`The 'setup-tailwind' generator is deprecated. Generating Tailwind configuration is no longer maintained. This generator will be removed in Nx 23.`);
|
|
10
|
-
let installTask = undefined;
|
|
11
|
-
const project = (0, devkit_1.readProjectConfiguration)(tree, options.project);
|
|
12
|
-
(0, devkit_1.generateFiles)(tree, (0, path_1.join)(__dirname, './files'), project.root, {});
|
|
13
|
-
(0, add_tailwind_style_imports_1.addTailwindStyleImports)(tree, project, options);
|
|
14
|
-
if (!options.skipPackageJson) {
|
|
15
|
-
installTask = (0, devkit_1.addDependenciesToPackageJson)(tree, {}, {
|
|
16
|
-
autoprefixer: versions_1.autoprefixerVersion,
|
|
17
|
-
postcss: versions_1.postcssVersion,
|
|
18
|
-
tailwindcss: versions_1.tailwindcssVersion,
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
if (!options.skipFormat)
|
|
22
|
-
await (0, devkit_1.formatFiles)(tree);
|
|
23
|
-
return installTask;
|
|
24
|
-
}
|
|
25
|
-
exports.default = setupTailwindGenerator;
|