@nx/nuxt 0.0.0-pr-22179-271588f
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/LICENSE +22 -0
- package/README.md +68 -0
- package/generators.json +26 -0
- package/index.d.ts +5 -0
- package/index.js +11 -0
- package/migrations.json +4 -0
- package/package.json +51 -0
- package/plugin.d.ts +1 -0
- package/plugin.js +5 -0
- package/src/generators/application/application.d.ts +4 -0
- package/src/generators/application/application.js +83 -0
- package/src/generators/application/files/__dot__npmrc +2 -0
- package/src/generators/application/files/nuxt.config.ts__tmpl__ +30 -0
- package/src/generators/application/files/src/app.vue__tmpl__ +48 -0
- package/src/generators/application/files/src/assets/css/styles.__style__ +41 -0
- package/src/generators/application/files/src/components/NxWelcome.vue__tmpl__ +843 -0
- package/src/generators/application/files/src/pages/about.vue__tmpl__ +16 -0
- package/src/generators/application/files/src/pages/index.vue__tmpl__ +6 -0
- package/src/generators/application/files/src/public/__dot__gitkeep +0 -0
- package/src/generators/application/files/src/public/favicon.ico__tmpl__ +0 -0
- package/src/generators/application/files/src/server/api/greet.ts__tmpl__ +10 -0
- package/src/generators/application/files/src/server/tsconfig.json__tmpl__ +3 -0
- package/src/generators/application/lib/add-e2e.d.ts +3 -0
- package/src/generators/application/lib/add-e2e.js +56 -0
- package/src/generators/application/lib/add-vitest.d.ts +3 -0
- package/src/generators/application/lib/add-vitest.js +38 -0
- package/src/generators/application/lib/ensure-dependencies.d.ts +3 -0
- package/src/generators/application/lib/ensure-dependencies.js +27 -0
- package/src/generators/application/lib/normalize-options.d.ts +4 -0
- package/src/generators/application/lib/normalize-options.js +44 -0
- package/src/generators/application/schema.d.ts +26 -0
- package/src/generators/application/schema.json +110 -0
- package/src/generators/init/init.d.ts +4 -0
- package/src/generators/init/init.js +19 -0
- package/src/generators/init/lib/utils.d.ts +5 -0
- package/src/generators/init/lib/utils.js +65 -0
- package/src/generators/init/schema.d.ts +6 -0
- package/src/generators/init/schema.json +33 -0
- package/src/generators/storybook-configuration/configuration.d.ts +4 -0
- package/src/generators/storybook-configuration/configuration.js +28 -0
- package/src/generators/storybook-configuration/schema.d.ts +12 -0
- package/src/generators/storybook-configuration/schema.json +80 -0
- package/src/migrations/update-18-1-0/add-include-tsconfig.d.ts +2 -0
- package/src/migrations/update-18-1-0/add-include-tsconfig.js +48 -0
- package/src/plugins/plugin.d.ts +9 -0
- package/src/plugins/plugin.js +172 -0
- package/src/utils/add-linting.d.ts +10 -0
- package/src/utils/add-linting.js +43 -0
- package/src/utils/create-ts-config.d.ts +6 -0
- package/src/utils/create-ts-config.js +47 -0
- package/src/utils/executor-utils.d.ts +1 -0
- package/src/utils/executor-utils.js +7 -0
- package/src/utils/update-gitignore.d.ts +2 -0
- package/src/utils/update-gitignore.js +23 -0
- package/src/utils/versions.d.ts +6 -0
- package/src/utils/versions.js +11 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const devkit_1 = require("@nx/devkit");
|
|
4
|
+
const executor_utils_1 = require("../../utils/executor-utils");
|
|
5
|
+
const path_1 = require("path");
|
|
6
|
+
async function default_1(tree) {
|
|
7
|
+
const projects = (0, devkit_1.getProjects)(tree);
|
|
8
|
+
for (const project of projects.values()) {
|
|
9
|
+
const nuxtConfigPath = findNuxtConfig(tree, project.root);
|
|
10
|
+
if (!nuxtConfigPath) {
|
|
11
|
+
continue;
|
|
12
|
+
}
|
|
13
|
+
const nuxtConfig = await getInfoFromNuxtConfig(nuxtConfigPath, project.root);
|
|
14
|
+
const buildDir = nuxtConfig.buildDir ?? '.nuxt';
|
|
15
|
+
const tsConfigPath = (0, devkit_1.joinPathFragments)(project.root, 'tsconfig.json');
|
|
16
|
+
if (tree.exists(tsConfigPath)) {
|
|
17
|
+
(0, devkit_1.updateJson)(tree, tsConfigPath, (json) => {
|
|
18
|
+
if (!json.include) {
|
|
19
|
+
json.include = [];
|
|
20
|
+
}
|
|
21
|
+
if (!json.include.includes(buildDir + '/nuxt.d.ts')) {
|
|
22
|
+
json.include.push(buildDir + '/nuxt.d.ts');
|
|
23
|
+
}
|
|
24
|
+
return json;
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
await (0, devkit_1.formatFiles)(tree);
|
|
29
|
+
}
|
|
30
|
+
exports.default = default_1;
|
|
31
|
+
function findNuxtConfig(tree, projectRoot) {
|
|
32
|
+
const allowsExt = ['js', 'mjs', 'ts', 'cjs', 'mts', 'cts'];
|
|
33
|
+
for (const ext of allowsExt) {
|
|
34
|
+
if (tree.exists((0, devkit_1.joinPathFragments)(projectRoot, `nuxt.config.${ext}`))) {
|
|
35
|
+
return (0, devkit_1.joinPathFragments)(projectRoot, `nuxt.config.${ext}`);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
async function getInfoFromNuxtConfig(configFilePath, projectRoot) {
|
|
40
|
+
const { loadNuxtConfig } = await (0, executor_utils_1.loadNuxtKitDynamicImport)();
|
|
41
|
+
const config = await loadNuxtConfig({
|
|
42
|
+
cwd: (0, devkit_1.joinPathFragments)(devkit_1.workspaceRoot, projectRoot),
|
|
43
|
+
configFile: (0, path_1.basename)(configFilePath),
|
|
44
|
+
});
|
|
45
|
+
return {
|
|
46
|
+
buildDir: config?.buildDir,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CreateDependencies, CreateNodes } from '@nx/devkit';
|
|
2
|
+
export declare const createDependencies: CreateDependencies;
|
|
3
|
+
export interface NuxtPluginOptions {
|
|
4
|
+
buildTargetName?: string;
|
|
5
|
+
serveTargetName?: string;
|
|
6
|
+
serveStaticTargetName?: string;
|
|
7
|
+
buildStaticTargetName?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const createNodes: CreateNodes<NuxtPluginOptions>;
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createNodes = exports.createDependencies = void 0;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const path_1 = require("path");
|
|
6
|
+
const cache_directory_1 = require("nx/src/utils/cache-directory");
|
|
7
|
+
const get_named_inputs_1 = require("@nx/devkit/src/utils/get-named-inputs");
|
|
8
|
+
const fs_1 = require("fs");
|
|
9
|
+
const executor_utils_1 = require("../utils/executor-utils");
|
|
10
|
+
const calculate_hash_for_create_nodes_1 = require("@nx/devkit/src/utils/calculate-hash-for-create-nodes");
|
|
11
|
+
const js_1 = require("@nx/js");
|
|
12
|
+
const cachePath = (0, path_1.join)(cache_directory_1.projectGraphCacheDirectory, 'nuxt.hash');
|
|
13
|
+
const targetsCache = (0, fs_1.existsSync)(cachePath) ? readTargetsCache() : {};
|
|
14
|
+
const calculatedTargets = {};
|
|
15
|
+
function readTargetsCache() {
|
|
16
|
+
return (0, devkit_1.readJsonFile)(cachePath);
|
|
17
|
+
}
|
|
18
|
+
function writeTargetsToCache(targets) {
|
|
19
|
+
(0, devkit_1.writeJsonFile)(cachePath, targets);
|
|
20
|
+
}
|
|
21
|
+
const createDependencies = () => {
|
|
22
|
+
writeTargetsToCache(calculatedTargets);
|
|
23
|
+
return [];
|
|
24
|
+
};
|
|
25
|
+
exports.createDependencies = createDependencies;
|
|
26
|
+
exports.createNodes = [
|
|
27
|
+
'**/nuxt.config.{js,ts,mjs,mts,cjs,cts}',
|
|
28
|
+
async (configFilePath, options, context) => {
|
|
29
|
+
const projectRoot = (0, path_1.dirname)(configFilePath);
|
|
30
|
+
// Do not create a project if package.json and project.json isn't there.
|
|
31
|
+
const siblingFiles = (0, fs_1.readdirSync)((0, path_1.join)(context.workspaceRoot, projectRoot));
|
|
32
|
+
if (!siblingFiles.includes('package.json') &&
|
|
33
|
+
!siblingFiles.includes('project.json')) {
|
|
34
|
+
return {};
|
|
35
|
+
}
|
|
36
|
+
options = normalizeOptions(options);
|
|
37
|
+
const hash = (0, calculate_hash_for_create_nodes_1.calculateHashForCreateNodes)(projectRoot, options, context, [
|
|
38
|
+
(0, js_1.getLockFileName)((0, devkit_1.detectPackageManager)(context.workspaceRoot)),
|
|
39
|
+
]);
|
|
40
|
+
const targets = targetsCache[hash]
|
|
41
|
+
? targetsCache[hash]
|
|
42
|
+
: await buildNuxtTargets(configFilePath, projectRoot, options, context);
|
|
43
|
+
calculatedTargets[hash] = targets;
|
|
44
|
+
return {
|
|
45
|
+
projects: {
|
|
46
|
+
[projectRoot]: {
|
|
47
|
+
root: projectRoot,
|
|
48
|
+
targets,
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
},
|
|
53
|
+
];
|
|
54
|
+
async function buildNuxtTargets(configFilePath, projectRoot, options, context) {
|
|
55
|
+
const nuxtConfig = await getInfoFromNuxtConfig(configFilePath, context, projectRoot);
|
|
56
|
+
const { buildOutputs } = getOutputs(nuxtConfig, projectRoot);
|
|
57
|
+
const namedInputs = (0, get_named_inputs_1.getNamedInputs)(projectRoot, context);
|
|
58
|
+
const targets = {};
|
|
59
|
+
targets[options.buildTargetName] = buildTarget(options.buildTargetName, namedInputs, buildOutputs, projectRoot);
|
|
60
|
+
targets[options.serveTargetName] = serveTarget(projectRoot);
|
|
61
|
+
targets[options.serveStaticTargetName] = serveStaticTarget(options);
|
|
62
|
+
targets[options.buildStaticTargetName] = buildStaticTarget(options.buildStaticTargetName, namedInputs, buildOutputs, projectRoot);
|
|
63
|
+
return targets;
|
|
64
|
+
}
|
|
65
|
+
function buildTarget(buildTargetName, namedInputs, buildOutputs, projectRoot) {
|
|
66
|
+
return {
|
|
67
|
+
command: `nuxt build`,
|
|
68
|
+
options: { cwd: projectRoot },
|
|
69
|
+
cache: true,
|
|
70
|
+
dependsOn: [`^${buildTargetName}`],
|
|
71
|
+
inputs: [
|
|
72
|
+
...('production' in namedInputs
|
|
73
|
+
? ['production', '^production']
|
|
74
|
+
: ['default', '^default']),
|
|
75
|
+
{
|
|
76
|
+
externalDependencies: ['nuxt'],
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
outputs: buildOutputs,
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
function serveTarget(projectRoot) {
|
|
83
|
+
const targetConfig = {
|
|
84
|
+
command: `nuxt dev`,
|
|
85
|
+
options: {
|
|
86
|
+
cwd: projectRoot,
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
return targetConfig;
|
|
90
|
+
}
|
|
91
|
+
function serveStaticTarget(options) {
|
|
92
|
+
const targetConfig = {
|
|
93
|
+
executor: '@nx/web:file-server',
|
|
94
|
+
options: {
|
|
95
|
+
buildTarget: `${options.buildStaticTargetName}`,
|
|
96
|
+
staticFilePath: '{projectRoot}/dist',
|
|
97
|
+
port: 4200,
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
return targetConfig;
|
|
101
|
+
}
|
|
102
|
+
function buildStaticTarget(buildStaticTargetName, namedInputs, buildOutputs, projectRoot) {
|
|
103
|
+
const targetConfig = {
|
|
104
|
+
command: `nuxt build --prerender`,
|
|
105
|
+
options: { cwd: projectRoot },
|
|
106
|
+
cache: true,
|
|
107
|
+
dependsOn: [`^${buildStaticTargetName}`],
|
|
108
|
+
inputs: [
|
|
109
|
+
...('production' in namedInputs
|
|
110
|
+
? ['production', '^production']
|
|
111
|
+
: ['default', '^default']),
|
|
112
|
+
{
|
|
113
|
+
externalDependencies: ['nuxt'],
|
|
114
|
+
},
|
|
115
|
+
],
|
|
116
|
+
outputs: buildOutputs,
|
|
117
|
+
};
|
|
118
|
+
return targetConfig;
|
|
119
|
+
}
|
|
120
|
+
async function getInfoFromNuxtConfig(configFilePath, context, projectRoot) {
|
|
121
|
+
const { loadNuxtConfig } = await (0, executor_utils_1.loadNuxtKitDynamicImport)();
|
|
122
|
+
const config = await loadNuxtConfig({
|
|
123
|
+
cwd: (0, devkit_1.joinPathFragments)(context.workspaceRoot, projectRoot),
|
|
124
|
+
configFile: (0, path_1.basename)(configFilePath),
|
|
125
|
+
});
|
|
126
|
+
return {
|
|
127
|
+
buildDir: config?.buildDir,
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
function getOutputs(nuxtConfig, projectRoot) {
|
|
131
|
+
let nuxtBuildDir = nuxtConfig?.buildDir;
|
|
132
|
+
if (nuxtConfig?.buildDir && (0, path_1.basename)(nuxtConfig?.buildDir) === '.nuxt') {
|
|
133
|
+
// if buildDir exists, it will be `something/something/.nuxt`
|
|
134
|
+
// we want the "general" outputPath to be `something/something`
|
|
135
|
+
nuxtBuildDir = nuxtConfig.buildDir.replace((0, path_1.basename)(nuxtConfig.buildDir), '');
|
|
136
|
+
}
|
|
137
|
+
const buildOutputPath = normalizeOutputPath(nuxtBuildDir, projectRoot);
|
|
138
|
+
return {
|
|
139
|
+
buildOutputs: [buildOutputPath],
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
function normalizeOutputPath(outputPath, projectRoot) {
|
|
143
|
+
if (!outputPath) {
|
|
144
|
+
if (projectRoot === '.') {
|
|
145
|
+
return `{projectRoot}`;
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
return `{workspaceRoot}/{projectRoot}`;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
if ((0, path_1.isAbsolute)(outputPath)) {
|
|
153
|
+
return `{workspaceRoot}/${(0, path_1.relative)(devkit_1.workspaceRoot, outputPath)}`;
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
if (outputPath.startsWith('..')) {
|
|
157
|
+
return (0, path_1.join)('{workspaceRoot}', (0, path_1.join)(projectRoot, outputPath));
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
return (0, path_1.join)('{projectRoot}', outputPath);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
function normalizeOptions(options) {
|
|
166
|
+
options ??= {};
|
|
167
|
+
options.buildTargetName ??= 'build';
|
|
168
|
+
options.serveTargetName ??= 'serve';
|
|
169
|
+
options.serveStaticTargetName ??= 'serve-static';
|
|
170
|
+
options.buildStaticTargetName ??= 'build-static';
|
|
171
|
+
return options;
|
|
172
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Tree } from 'nx/src/generators/tree';
|
|
2
|
+
import { Linter } from '@nx/eslint';
|
|
3
|
+
import { GeneratorCallback } from '@nx/devkit';
|
|
4
|
+
export declare function addLinting(host: Tree, options: {
|
|
5
|
+
linter: Linter;
|
|
6
|
+
projectName: string;
|
|
7
|
+
projectRoot: string;
|
|
8
|
+
unitTestRunner?: 'vitest' | 'none';
|
|
9
|
+
rootProject?: boolean;
|
|
10
|
+
}): Promise<GeneratorCallback>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addLinting = void 0;
|
|
4
|
+
const eslint_1 = require("@nx/eslint");
|
|
5
|
+
const path_1 = require("nx/src/utils/path");
|
|
6
|
+
const devkit_1 = require("@nx/devkit");
|
|
7
|
+
const vue_1 = require("@nx/vue");
|
|
8
|
+
const versions_1 = require("./versions");
|
|
9
|
+
async function addLinting(host, options) {
|
|
10
|
+
const tasks = [];
|
|
11
|
+
if (options.linter === 'eslint') {
|
|
12
|
+
const lintTask = await (0, eslint_1.lintProjectGenerator)(host, {
|
|
13
|
+
linter: options.linter,
|
|
14
|
+
project: options.projectName,
|
|
15
|
+
tsConfigPaths: [(0, path_1.joinPathFragments)(options.projectRoot, 'tsconfig.json')],
|
|
16
|
+
unitTestRunner: options.unitTestRunner,
|
|
17
|
+
skipFormat: true,
|
|
18
|
+
rootProject: options.rootProject,
|
|
19
|
+
addPlugin: true,
|
|
20
|
+
});
|
|
21
|
+
tasks.push(lintTask);
|
|
22
|
+
(0, vue_1.editEslintConfigFiles)(host, options.projectRoot, options.rootProject);
|
|
23
|
+
(0, devkit_1.updateJson)(host, (0, path_1.joinPathFragments)(options.projectRoot, '.eslintrc.json'), (json) => {
|
|
24
|
+
const { extends: pluginExtends, ignorePatterns: pluginIgnorePatters, ...config } = json;
|
|
25
|
+
return {
|
|
26
|
+
extends: ['@nuxt/eslint-config', ...(pluginExtends || [])],
|
|
27
|
+
ignorePatterns: [
|
|
28
|
+
...(pluginIgnorePatters || []),
|
|
29
|
+
'.nuxt/**',
|
|
30
|
+
'.output/**',
|
|
31
|
+
'node_modules',
|
|
32
|
+
],
|
|
33
|
+
...config,
|
|
34
|
+
};
|
|
35
|
+
});
|
|
36
|
+
const installTask = (0, devkit_1.addDependenciesToPackageJson)(host, {}, {
|
|
37
|
+
'@nuxt/eslint-config': versions_1.nuxtEslintConfigVersion,
|
|
38
|
+
});
|
|
39
|
+
tasks.push(installTask);
|
|
40
|
+
}
|
|
41
|
+
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
42
|
+
}
|
|
43
|
+
exports.addLinting = addLinting;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createTsConfig = void 0;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const shared = require("@nx/js/src/utils/typescript/create-ts-config");
|
|
6
|
+
function createTsConfig(host, options, relativePathToRootTsConfig) {
|
|
7
|
+
createAppTsConfig(host, options);
|
|
8
|
+
const json = {
|
|
9
|
+
compilerOptions: {},
|
|
10
|
+
files: [],
|
|
11
|
+
include: ['.nuxt/nuxt.d.ts'],
|
|
12
|
+
references: [
|
|
13
|
+
{
|
|
14
|
+
path: './tsconfig.app.json',
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
};
|
|
18
|
+
if (options.unitTestRunner !== 'none') {
|
|
19
|
+
json.references.push({
|
|
20
|
+
path: './tsconfig.spec.json',
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
// inline tsconfig.base.json into the project
|
|
24
|
+
if (options.rootProject) {
|
|
25
|
+
json.compileOnSave = false;
|
|
26
|
+
json.compilerOptions = {
|
|
27
|
+
...shared.tsConfigBaseOptions,
|
|
28
|
+
...json.compilerOptions,
|
|
29
|
+
};
|
|
30
|
+
json.exclude = ['node_modules', 'tmp'];
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
json.extends = relativePathToRootTsConfig;
|
|
34
|
+
}
|
|
35
|
+
(0, devkit_1.writeJson)(host, `${options.projectRoot}/tsconfig.json`, json);
|
|
36
|
+
}
|
|
37
|
+
exports.createTsConfig = createTsConfig;
|
|
38
|
+
function createAppTsConfig(host, options) {
|
|
39
|
+
const json = {
|
|
40
|
+
extends: './tsconfig.json',
|
|
41
|
+
compilerOptions: {
|
|
42
|
+
composite: true,
|
|
43
|
+
},
|
|
44
|
+
exclude: [],
|
|
45
|
+
};
|
|
46
|
+
(0, devkit_1.writeJson)(host, `${options.projectRoot}/tsconfig.app.json`, json);
|
|
47
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function loadNuxtKitDynamicImport(): Promise<typeof import("@nuxt/kit")>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.loadNuxtKitDynamicImport = void 0;
|
|
4
|
+
function loadNuxtKitDynamicImport() {
|
|
5
|
+
return Function('return import("@nuxt/kit")')();
|
|
6
|
+
}
|
|
7
|
+
exports.loadNuxtKitDynamicImport = loadNuxtKitDynamicImport;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateGitIgnore = void 0;
|
|
4
|
+
function updateGitIgnore(tree) {
|
|
5
|
+
const contents = tree.read('.gitignore', 'utf-8') ?? '';
|
|
6
|
+
const nuxtEntries = [
|
|
7
|
+
'# Nuxt dev/build outputs',
|
|
8
|
+
'.output',
|
|
9
|
+
'.data',
|
|
10
|
+
'.nuxt',
|
|
11
|
+
'.nitro',
|
|
12
|
+
'.cache',
|
|
13
|
+
];
|
|
14
|
+
let newContents = contents;
|
|
15
|
+
for (const entry of nuxtEntries) {
|
|
16
|
+
const regex = new RegExp(`^${entry}$`, 'm');
|
|
17
|
+
if (!regex.test(newContents)) {
|
|
18
|
+
newContents += `\n${entry}`;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
tree.write('.gitignore', [newContents].join('\n'));
|
|
22
|
+
}
|
|
23
|
+
exports.updateGitIgnore = updateGitIgnore;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const nxVersion: any;
|
|
2
|
+
export declare const h3Version = "^1.8.2";
|
|
3
|
+
export declare const nuxtVersion = "^3.10.0";
|
|
4
|
+
export declare const nuxtDevtoolsVersion = "1.0.0";
|
|
5
|
+
export declare const nuxtUiTemplatesVersion = "^1.3.1";
|
|
6
|
+
export declare const nuxtEslintConfigVersion = "0.2.0";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.nuxtEslintConfigVersion = exports.nuxtUiTemplatesVersion = exports.nuxtDevtoolsVersion = exports.nuxtVersion = exports.h3Version = exports.nxVersion = void 0;
|
|
4
|
+
exports.nxVersion = require('../../package.json').version;
|
|
5
|
+
// nuxt deps
|
|
6
|
+
exports.h3Version = '^1.8.2';
|
|
7
|
+
exports.nuxtVersion = '^3.10.0';
|
|
8
|
+
exports.nuxtDevtoolsVersion = '1.0.0';
|
|
9
|
+
exports.nuxtUiTemplatesVersion = '^1.3.1';
|
|
10
|
+
// linting deps
|
|
11
|
+
exports.nuxtEslintConfigVersion = '0.2.0';
|