@dword-design/base-config-nuxt 3.2.8 → 3.2.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/analyze.js +1 -1
- package/dist/dev.js +1 -0
- package/dist/index.js +2 -0
- package/dist/lint.js +3 -3
- package/dist/modules/project/modules/i18n/index.js +1 -1
- package/dist/modules/project/modules/server-middleware/index.js +23 -17
- package/dist/prepublish-only.js +4 -2
- package/dist/start.js +1 -0
- package/package.json +5 -5
package/dist/analyze.js
CHANGED
package/dist/dev.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -6,9 +6,11 @@ import analyze from "./analyze.js";
|
|
|
6
6
|
import depcheckSpecial from "./depcheck-special.js";
|
|
7
7
|
import dev from "./dev.js";
|
|
8
8
|
import eslintConfig from "./eslint.config.js";
|
|
9
|
+
import getNuxtConfig from "./get-nuxt-config.js";
|
|
9
10
|
import lint from "./lint.js";
|
|
10
11
|
import prepublishOnly from "./prepublish-only.js";
|
|
11
12
|
import start from "./start.js";
|
|
13
|
+
export { getNuxtConfig };
|
|
12
14
|
export default {
|
|
13
15
|
allowedMatches: ['.stylelintrc.json', 'api', 'assets', 'components', 'content', 'i18n', 'layouts', 'middleware', 'model', 'modules', 'nuxt.config.js', 'pages', 'plugins', 'static', 'store', 'types'],
|
|
14
16
|
commands: {
|
package/dist/lint.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { execaCommand } from 'execa';
|
|
2
2
|
export default (async () => {
|
|
3
3
|
try {
|
|
4
|
-
await
|
|
4
|
+
await execaCommand('eslint --fix --ignore-path .gitignore --ext .js,.json,.vue .', {
|
|
5
5
|
all: true
|
|
6
6
|
});
|
|
7
|
-
await
|
|
7
|
+
await execaCommand('stylelint --fix --allow-empty-input --ignore-path .gitignore **/*.{css,scss,vue}', {
|
|
8
8
|
all: true
|
|
9
9
|
});
|
|
10
10
|
} catch (error) {
|
|
@@ -5,7 +5,7 @@ import some from "@dword-design/functions/dist/some.js";
|
|
|
5
5
|
import uniq from "@dword-design/functions/dist/uniq.js";
|
|
6
6
|
import packageName from 'depcheck-package-name';
|
|
7
7
|
import fs from 'fs-extra';
|
|
8
|
-
import globby from 'globby';
|
|
8
|
+
import { globby } from 'globby';
|
|
9
9
|
import P from 'path';
|
|
10
10
|
import vueTemplateCompiler from 'vue-template-compiler';
|
|
11
11
|
import MissingNuxtI18nHeadError from "./missing-nuxt-i18n-head-error.js";
|
|
@@ -3,21 +3,27 @@ import express from 'express';
|
|
|
3
3
|
import mountFiles from 'express-mount-files';
|
|
4
4
|
import P from 'path';
|
|
5
5
|
export default async function (options) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
6
|
+
// Make sure that we do not register the server middleware
|
|
7
|
+
// on build because processes like express-mysql-session do
|
|
8
|
+
// not get closed
|
|
9
|
+
// https://github.com/nuxt/nuxt.js/blob/2ec62617ced873fef97c73a6d7aa1271911ccfd5/packages/core/src/nuxt.js#L56
|
|
10
|
+
if (this.options.server !== false) {
|
|
11
|
+
var _options$getExpress;
|
|
12
|
+
const app = (await ((_options$getExpress = options.getExpress) === null || _options$getExpress === void 0 ? void 0 : _options$getExpress.call(options))) || express();
|
|
13
|
+
app.use(mountFiles(P.join(this.options.srcDir, 'api'), {
|
|
14
|
+
jitiOptions: {
|
|
15
|
+
esmResolve: true,
|
|
16
|
+
interopDefault: true,
|
|
17
|
+
transformOptions: {
|
|
18
|
+
babel: babelConfig
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
paramChar: '_'
|
|
22
|
+
}));
|
|
23
|
+
this.addServerMiddleware({
|
|
24
|
+
handler: app,
|
|
25
|
+
path: '/api'
|
|
26
|
+
});
|
|
27
|
+
this.options.watch.push(P.join(this.options.srcDir, 'api'));
|
|
28
|
+
}
|
|
23
29
|
}
|
package/dist/prepublish-only.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import execa from 'execa';
|
|
1
|
+
import { execa } from 'execa';
|
|
2
2
|
import fs from 'fs-extra';
|
|
3
3
|
import { Builder, Nuxt } from 'nuxt';
|
|
4
4
|
import getNuxtConfig from "./get-nuxt-config.js";
|
|
@@ -7,8 +7,10 @@ export default (async (options = {}) => {
|
|
|
7
7
|
await lint();
|
|
8
8
|
const nuxt = new Nuxt({
|
|
9
9
|
...getNuxtConfig(),
|
|
10
|
+
_build: true,
|
|
10
11
|
dev: false,
|
|
11
|
-
rootDir: options.rootDir
|
|
12
|
+
rootDir: options.rootDir,
|
|
13
|
+
server: false
|
|
12
14
|
});
|
|
13
15
|
await new Builder(nuxt).build();
|
|
14
16
|
if (await fs.exists('model')) {
|
package/dist/start.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dword-design/base-config-nuxt",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.10",
|
|
4
4
|
"repository": "dword-design/base-config-nuxt",
|
|
5
5
|
"funding": "https://github.com/sponsors/dword-design",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"@nuxtjs/stylelint-module": "^4.0.0",
|
|
37
37
|
"depcheck-package-name": "^2.0.0",
|
|
38
38
|
"depcheck-parser-vue": "^2.0.0",
|
|
39
|
-
"execa": "^
|
|
39
|
+
"execa": "^6.1.0",
|
|
40
40
|
"express": "^4.17.1",
|
|
41
41
|
"express-mount-files": "npm:@dword-design/express-mount-files",
|
|
42
|
-
"fs-extra": "^
|
|
43
|
-
"globby": "^
|
|
42
|
+
"fs-extra": "^11.1.0",
|
|
43
|
+
"globby": "^13.1.3",
|
|
44
44
|
"jiti": "npm:@dword-design/jiti",
|
|
45
45
|
"nuxt": "~2.15.0",
|
|
46
46
|
"nuxt-babel-runtime": "^3.0.0",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@dword-design/base": "^9.0.0",
|
|
60
|
-
"@dword-design/puppeteer": "^
|
|
60
|
+
"@dword-design/puppeteer": "^6.0.0",
|
|
61
61
|
"@dword-design/tester": "^2.0.9",
|
|
62
62
|
"@dword-design/tester-plugin-env": "^2.0.8",
|
|
63
63
|
"@dword-design/tester-plugin-puppeteer": "^2.1.19",
|