@dword-design/base-config-nuxt 9.0.8 → 9.0.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/dist/build.js +0 -11
- package/dist/get-eslint-config.d.ts +1 -2
- package/dist/get-eslint-config.js +1 -8
- package/dist/index.d.ts +6 -9
- package/dist/index.js +13 -9
- package/dist/nuxt.config.js +0 -6
- package/package.json +12 -20
- package/dist/resolve-aliases.d.ts +0 -4
- package/dist/resolve-aliases.js +0 -32
package/dist/build.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import dotenv from "@dword-design/dotenv-json-extended";
|
|
2
2
|
import { execaCommand } from "execa";
|
|
3
|
-
import resolveAliases from "./resolve-aliases.js";
|
|
4
3
|
export default async function (options = {}) {
|
|
5
4
|
options = {
|
|
6
5
|
env: {},
|
|
@@ -26,15 +25,5 @@ export default async function (options = {}) {
|
|
|
26
25
|
...options.env
|
|
27
26
|
}
|
|
28
27
|
});
|
|
29
|
-
await execaCommand("mkdist --src=model --declaration --ext=js --pattern=** --pattern=!**/*.spec.ts --pattern=!**/*-snapshots", {
|
|
30
|
-
...(options.log && {
|
|
31
|
-
stdout: "inherit"
|
|
32
|
-
}),
|
|
33
|
-
cwd: this.cwd,
|
|
34
|
-
stderr: options.stderr
|
|
35
|
-
});
|
|
36
|
-
await resolveAliases({
|
|
37
|
-
cwd: this.cwd
|
|
38
|
-
});
|
|
39
28
|
return nuxt;
|
|
40
29
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import endent from "endent";
|
|
2
2
|
export default ({
|
|
3
|
-
virtualImports = [],
|
|
4
3
|
ignore = []
|
|
5
4
|
} = {}) => endent`
|
|
6
5
|
import config from '@dword-design/eslint-config';
|
|
@@ -10,13 +9,7 @@ export default ({
|
|
|
10
9
|
|
|
11
10
|
export default await withNuxt(
|
|
12
11
|
globalIgnores([${["eslint.config.ts", "eslint.lint-staged.config.ts", ...ignore].map(pattern => `'${pattern}'`).join(", ")}]),
|
|
13
|
-
config
|
|
14
|
-
\n{
|
|
15
|
-
rules: {
|
|
16
|
-
'import-x/no-unresolved': ['error', { ignore: [${virtualImports.map(_import => `'${_import}'`).join(", ")}] }],
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
` : ""}
|
|
12
|
+
config,
|
|
20
13
|
{
|
|
21
14
|
files: ['**/pages/**/*.{vue,ts}', 'server/api/**/*.ts'],
|
|
22
15
|
rules: {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Base
|
|
1
|
+
import type { Base } from '@dword-design/base';
|
|
2
2
|
import analyze from './analyze';
|
|
3
3
|
import build from './build';
|
|
4
4
|
import dev from './dev';
|
|
@@ -6,10 +6,7 @@ import lint from './lint';
|
|
|
6
6
|
import prepublishOnly from './prepublish-only';
|
|
7
7
|
import start from './start';
|
|
8
8
|
import typecheck from './typecheck';
|
|
9
|
-
|
|
10
|
-
virtualImports?: string[];
|
|
11
|
-
};
|
|
12
|
-
declare const _default: (this: Base, config: ConfigNuxt) => {
|
|
9
|
+
declare const _default: (this: Base) => {
|
|
13
10
|
allowedMatches: string[];
|
|
14
11
|
commands: {
|
|
15
12
|
analyze: typeof analyze;
|
|
@@ -40,10 +37,10 @@ declare const _default: (this: Base, config: ConfigNuxt) => {
|
|
|
40
37
|
prepare: () => Promise<void>;
|
|
41
38
|
typecheck: typeof typecheck;
|
|
42
39
|
typescriptConfig: {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
files: never[];
|
|
41
|
+
references: {
|
|
42
|
+
path: string;
|
|
43
|
+
}[];
|
|
47
44
|
vueCompilerOptions: {
|
|
48
45
|
cssModulesLocalsConvention: string;
|
|
49
46
|
strictCssModules: boolean;
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,6 @@ import depcheck from "depcheck";
|
|
|
7
7
|
import binName from "depcheck-bin-name";
|
|
8
8
|
import packageName from "depcheck-package-name";
|
|
9
9
|
import javascript from "endent";
|
|
10
|
-
import { pick } from "lodash-es";
|
|
11
10
|
import outputFiles from "output-files";
|
|
12
11
|
import analyze from "./analyze.js";
|
|
13
12
|
import build from "./build.js";
|
|
@@ -21,9 +20,9 @@ import typecheck from "./typecheck.js";
|
|
|
21
20
|
const __dirname = pathLib.dirname(fileURLToPath(import.meta.url));
|
|
22
21
|
const resolver = createRequire(import.meta.url);
|
|
23
22
|
const isInNodeModules = __dirname.split(pathLib.sep).includes("node_modules");
|
|
24
|
-
export default defineBaseConfig(function (
|
|
23
|
+
export default defineBaseConfig(function () {
|
|
25
24
|
return {
|
|
26
|
-
allowedMatches: [".stylelintignore", ".stylelintrc.json", "server/api/**/*.ts", "server/plugins/**/*.ts", "server/routes/**/*.ts", "server/middleware/**/*.ts", "server/utils/**/*.ts", "app/app.vue", "app/assets", "app/components/**/*.vue", "app/composables/*.ts", "content", "i18n/*/*.ts", "app/layouts/*.vue", "app/middleware/*.ts", "app/pages/**/*.vue", "app/pages/**/*.spec.ts", "app/plugins/*.ts", "app/utils/*.ts", "
|
|
25
|
+
allowedMatches: [".stylelintignore", ".stylelintrc.json", "server/api/**/*.ts", "server/plugins/**/*.ts", "server/routes/**/*.ts", "server/middleware/**/*.ts", "server/utils/**/*.ts", "app/app.vue", "app/assets", "app/components/**/*.vue", "app/composables/*.ts", "content", "i18n/*/*.ts", "app/layouts/*.vue", "app/middleware/*.ts", "app/pages/**/*.vue", "app/pages/**/*.spec.ts", "app/plugins/*.ts", "app/utils/*.ts", "modules", "config.ts", "public", "shared/utils/*.ts", "shared/types/*.ts"],
|
|
27
26
|
commands: {
|
|
28
27
|
analyze,
|
|
29
28
|
build,
|
|
@@ -41,7 +40,7 @@ export default defineBaseConfig(function (config) {
|
|
|
41
40
|
})]
|
|
42
41
|
},
|
|
43
42
|
editorIgnore: [".eslintcache", ".stylelintcache", ".stylelintignore", ".stylelintrc.json", ".nuxt", ".output", "dist", "nuxt.config.ts"],
|
|
44
|
-
eslintConfig: getEslintConfig(
|
|
43
|
+
eslintConfig: getEslintConfig(),
|
|
45
44
|
gitignore: ["/.eslintcache", "/.nuxt", "/.output", "/.stylelintcache", "/dist", "/nuxt.config.ts"],
|
|
46
45
|
hasTypescriptConfigRootAlias: false,
|
|
47
46
|
lint,
|
|
@@ -74,11 +73,16 @@ export default defineBaseConfig(function (config) {
|
|
|
74
73
|
},
|
|
75
74
|
typecheck,
|
|
76
75
|
typescriptConfig: {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
},
|
|
81
|
-
|
|
76
|
+
files: [],
|
|
77
|
+
references: [{
|
|
78
|
+
path: "./.nuxt/tsconfig.app.json"
|
|
79
|
+
}, {
|
|
80
|
+
path: "./.nuxt/tsconfig.server.json"
|
|
81
|
+
}, {
|
|
82
|
+
path: "./.nuxt/tsconfig.shared.json"
|
|
83
|
+
}, {
|
|
84
|
+
path: "./.nuxt/tsconfig.node.json"
|
|
85
|
+
}],
|
|
82
86
|
vueCompilerOptions: {
|
|
83
87
|
cssModulesLocalsConvention: "camelCaseOnly",
|
|
84
88
|
strictCssModules: true
|
package/dist/nuxt.config.js
CHANGED
|
@@ -24,12 +24,6 @@ export default defineNuxtConfig({
|
|
|
24
24
|
devtools: {
|
|
25
25
|
enabled: true
|
|
26
26
|
},
|
|
27
|
-
hooks: {
|
|
28
|
-
"prepare:types": opts => {
|
|
29
|
-
opts.tsConfig.include = opts.tsConfig.include || [];
|
|
30
|
-
opts.tsConfig.include.push("../model/**/*");
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
27
|
modules: [defineNuxtModule({
|
|
34
28
|
setup: (options, nuxt) => {
|
|
35
29
|
if (!config.userScalable) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dword-design/base-config-nuxt",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.10",
|
|
4
4
|
"repository": "dword-design/base-config-nuxt",
|
|
5
5
|
"funding": "https://github.com/sponsors/dword-design",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,41 +31,33 @@
|
|
|
31
31
|
"verify": "base verify"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@
|
|
35
|
-
"@dword-design/
|
|
36
|
-
"@dword-design/depcheck-parser-sass": "^6.0.0",
|
|
34
|
+
"@dword-design/base": "^16.1.8",
|
|
35
|
+
"@dword-design/depcheck-parser-sass": "^6.0.3",
|
|
37
36
|
"@dword-design/dotenv-json-extended": "^4.0.1",
|
|
38
37
|
"@dword-design/nuxt-page-title": "^1.0.0",
|
|
39
|
-
"@dword-design/stylelint-config": "^
|
|
40
|
-
"@nuxt/eslint": "^1.
|
|
41
|
-
"@nuxt/kit": "^4.2.
|
|
38
|
+
"@dword-design/stylelint-config": "^5.0.2",
|
|
39
|
+
"@nuxt/eslint": "^1.12.1",
|
|
40
|
+
"@nuxt/kit": "^4.2.2",
|
|
42
41
|
"@nuxtjs/stylelint-module": "^5.2.1",
|
|
43
|
-
"babel-plugin-add-import-extension": "^1.6.0",
|
|
44
|
-
"babel-plugin-module-resolver": "^5.0.2",
|
|
45
42
|
"depcheck-bin-name": "^2.0.0",
|
|
46
43
|
"depcheck-package-name": "^4.0.1",
|
|
47
44
|
"endent": "npm:@dword-design/endent@^1.4.7",
|
|
48
|
-
"execa": "^9.6.
|
|
49
|
-
"fs-extra": "^11.3.2",
|
|
50
|
-
"globby": "^16.0.0",
|
|
45
|
+
"execa": "^9.6.1",
|
|
51
46
|
"jiti": "^2.6.1",
|
|
52
|
-
"
|
|
53
|
-
"nuxt": "^4.0.0",
|
|
47
|
+
"nuxt": "^4.2.2",
|
|
54
48
|
"output-files": "^3.0.0",
|
|
55
49
|
"require-package-name": "npm:@dword-design/require-package-name-fork@^0.0.1",
|
|
56
|
-
"sass": "^1.
|
|
57
|
-
"stylelint": "^16.26.
|
|
50
|
+
"sass": "^1.97.1",
|
|
51
|
+
"stylelint": "^16.26.1",
|
|
58
52
|
"typescript": "^5.9.3",
|
|
59
53
|
"vite-plugin-eslint2": "^5.0.4"
|
|
60
54
|
},
|
|
61
55
|
"devDependencies": {
|
|
62
56
|
"@dword-design/defu": "^1.0.3",
|
|
63
57
|
"@nuxtjs/tailwindcss": "7.0.0-beta.0",
|
|
64
|
-
"@playwright/browser-chromium": "^1.
|
|
65
|
-
"@playwright/test": "^1.
|
|
66
|
-
"@types/babel__core": "^7.20.5",
|
|
58
|
+
"@playwright/browser-chromium": "^1.57.0",
|
|
59
|
+
"@playwright/test": "^1.57.0",
|
|
67
60
|
"@types/fs-extra": "^11.0.4",
|
|
68
|
-
"@types/lodash-es": "^4.17.12",
|
|
69
61
|
"axios": "^1.13.2",
|
|
70
62
|
"delay": "^7.0.0",
|
|
71
63
|
"get-port": "^7.1.0",
|
package/dist/resolve-aliases.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import pathLib from "node:path";
|
|
2
|
-
import * as babel from "@babel/core";
|
|
3
|
-
import packageName from "depcheck-package-name";
|
|
4
|
-
import fs from "fs-extra";
|
|
5
|
-
import { globby } from "globby";
|
|
6
|
-
export default async ({
|
|
7
|
-
cwd = "."
|
|
8
|
-
} = {}) => {
|
|
9
|
-
const babelConfig = {
|
|
10
|
-
plugins: [[packageName`babel-plugin-module-resolver`, {
|
|
11
|
-
alias: {
|
|
12
|
-
"@@/model": "./dist"
|
|
13
|
-
},
|
|
14
|
-
cwd
|
|
15
|
-
}], packageName`babel-plugin-add-import-extension`]
|
|
16
|
-
};
|
|
17
|
-
const paths = await globby("**/*.js", {
|
|
18
|
-
absolute: true,
|
|
19
|
-
cwd: pathLib.join(cwd, "dist")
|
|
20
|
-
});
|
|
21
|
-
await Promise.all(paths.map(async path => {
|
|
22
|
-
const source = await fs.readFile(path, "utf8");
|
|
23
|
-
const result = await babel.transformAsync(source, {
|
|
24
|
-
...babelConfig,
|
|
25
|
-
cwd,
|
|
26
|
-
filename: path
|
|
27
|
-
});
|
|
28
|
-
if (result?.code) {
|
|
29
|
-
await fs.outputFile(path, result.code);
|
|
30
|
-
}
|
|
31
|
-
}));
|
|
32
|
-
};
|