@modern-js/plugin-docsite 0.0.0-canary-20220127122200 → 0.0.0-canary-20220210161443
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/CHANGELOG.md +20 -4
- package/dist/js/modern/build-task.js +4 -2
- package/dist/js/modern/features/index.js +2 -1
- package/dist/js/modern/index.js +6 -2
- package/dist/js/node/build-task.js +4 -2
- package/dist/js/node/features/index.js +2 -1
- package/dist/js/node/index.js +6 -2
- package/dist/types/features/index.d.ts +2 -0
- package/dist/types/index.d.ts +2 -0
- package/package.json +6 -6
- package/tests/tsconfig.json +13 -0
- package/.modern-js/main/index.html +0 -27
package/CHANGELOG.md
CHANGED
@@ -1,15 +1,31 @@
|
|
1
1
|
# @modern-js/plugin-docsite
|
2
2
|
|
3
|
-
## 0.0.0-canary-
|
3
|
+
## 0.0.0-canary-20220210161443
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 24f616ca: feat: support custom meta info
|
8
|
+
- Updated dependencies [bd819a8d]
|
9
|
+
- Updated dependencies [ec4dbffb]
|
10
|
+
- Updated dependencies [d099e5c5]
|
11
|
+
- Updated dependencies [bada2879]
|
12
|
+
- Updated dependencies [24f616ca]
|
13
|
+
- Updated dependencies [bd819a8d]
|
14
|
+
- @modern-js/core@0.0.0-canary-20220210161443
|
15
|
+
- @modern-js/webpack@0.0.0-canary-20220210161443
|
16
|
+
- @modern-js/utils@0.0.0-canary-20220210161443
|
17
|
+
|
18
|
+
## 1.2.1
|
4
19
|
|
5
20
|
### Patch Changes
|
6
21
|
|
7
22
|
- 83166714: change .npmignore
|
8
23
|
- Updated dependencies [83166714]
|
24
|
+
- Updated dependencies [c3de9882]
|
9
25
|
- Updated dependencies [33ff48af]
|
10
|
-
- @modern-js/core@
|
11
|
-
- @modern-js/webpack@
|
12
|
-
- @modern-js/utils@
|
26
|
+
- @modern-js/core@1.3.2
|
27
|
+
- @modern-js/webpack@1.2.1
|
28
|
+
- @modern-js/utils@1.2.2
|
13
29
|
|
14
30
|
## 1.2.0
|
15
31
|
|
@@ -8,6 +8,7 @@ const glob = Import.lazy('glob', require);
|
|
8
8
|
const DEFAULT_PORT = 5000;
|
9
9
|
export async function buildDocs({
|
10
10
|
appDirectory,
|
11
|
+
internalDirectory,
|
11
12
|
isDev = false,
|
12
13
|
port = DEFAULT_PORT
|
13
14
|
}) {
|
@@ -34,7 +35,7 @@ export async function buildDocs({
|
|
34
35
|
return;
|
35
36
|
}
|
36
37
|
|
37
|
-
const tmpDir = path.join(
|
38
|
+
const tmpDir = path.join(internalDirectory, './docs');
|
38
39
|
fs.ensureDirSync(tmpDir);
|
39
40
|
const finalWebpackConfig = wp.generatorWebpackConfig(appDirectory, tmpDir, isDev);
|
40
41
|
|
package/dist/js/modern/index.js
CHANGED
@@ -6,7 +6,8 @@ export default core.createPlugin(() => ({
|
|
6
6
|
program
|
7
7
|
}) {
|
8
8
|
const {
|
9
|
-
appDirectory
|
9
|
+
appDirectory,
|
10
|
+
internalDirectory
|
10
11
|
} = core.useAppContext();
|
11
12
|
const devCommand = program.commandsMap.get('dev');
|
12
13
|
|
@@ -14,6 +15,7 @@ export default core.createPlugin(() => ({
|
|
14
15
|
devCommand.command('docs').action(async () => {
|
15
16
|
await features.buildDocs({
|
16
17
|
appDirectory,
|
18
|
+
internalDirectory,
|
17
19
|
isDev: true
|
18
20
|
});
|
19
21
|
});
|
@@ -23,13 +25,15 @@ export default core.createPlugin(() => ({
|
|
23
25
|
// module-tools menu mode
|
24
26
|
moduleToolsMenu() {
|
25
27
|
const {
|
26
|
-
appDirectory
|
28
|
+
appDirectory,
|
29
|
+
internalDirectory
|
27
30
|
} = core.useAppContext();
|
28
31
|
return {
|
29
32
|
name: 'Docsite 调试',
|
30
33
|
value: 'docsite',
|
31
34
|
runTask: async () => features.buildDocs({
|
32
35
|
appDirectory,
|
36
|
+
internalDirectory,
|
33
37
|
isDev: true
|
34
38
|
})
|
35
39
|
};
|
@@ -25,6 +25,7 @@ const DEFAULT_PORT = 5000;
|
|
25
25
|
|
26
26
|
async function buildDocs({
|
27
27
|
appDirectory,
|
28
|
+
internalDirectory,
|
28
29
|
isDev = false,
|
29
30
|
port = DEFAULT_PORT
|
30
31
|
}) {
|
@@ -52,7 +53,7 @@ async function buildDocs({
|
|
52
53
|
return;
|
53
54
|
}
|
54
55
|
|
55
|
-
const tmpDir = _path.default.join(
|
56
|
+
const tmpDir = _path.default.join(internalDirectory, './docs');
|
56
57
|
|
57
58
|
_utils.fs.ensureDirSync(tmpDir);
|
58
59
|
|
package/dist/js/node/index.js
CHANGED
@@ -16,7 +16,8 @@ var _default = core.createPlugin(() => ({
|
|
16
16
|
program
|
17
17
|
}) {
|
18
18
|
const {
|
19
|
-
appDirectory
|
19
|
+
appDirectory,
|
20
|
+
internalDirectory
|
20
21
|
} = core.useAppContext();
|
21
22
|
const devCommand = program.commandsMap.get('dev');
|
22
23
|
|
@@ -24,6 +25,7 @@ var _default = core.createPlugin(() => ({
|
|
24
25
|
devCommand.command('docs').action(async () => {
|
25
26
|
await features.buildDocs({
|
26
27
|
appDirectory,
|
28
|
+
internalDirectory,
|
27
29
|
isDev: true
|
28
30
|
});
|
29
31
|
});
|
@@ -33,13 +35,15 @@ var _default = core.createPlugin(() => ({
|
|
33
35
|
// module-tools menu mode
|
34
36
|
moduleToolsMenu() {
|
35
37
|
const {
|
36
|
-
appDirectory
|
38
|
+
appDirectory,
|
39
|
+
internalDirectory
|
37
40
|
} = core.useAppContext();
|
38
41
|
return {
|
39
42
|
name: 'Docsite 调试',
|
40
43
|
value: 'docsite',
|
41
44
|
runTask: async () => features.buildDocs({
|
42
45
|
appDirectory,
|
46
|
+
internalDirectory,
|
43
47
|
isDev: true
|
44
48
|
})
|
45
49
|
};
|
@@ -1,12 +1,14 @@
|
|
1
1
|
import type { Configuration } from 'webpack';
|
2
2
|
interface IBuildDocsParams {
|
3
3
|
appDirectory: string;
|
4
|
+
internalDirectory: string;
|
4
5
|
webpackConfig?: Configuration;
|
5
6
|
isDev?: boolean;
|
6
7
|
port?: number;
|
7
8
|
}
|
8
9
|
export declare function buildDocs({
|
9
10
|
appDirectory,
|
11
|
+
internalDirectory,
|
10
12
|
isDev,
|
11
13
|
port
|
12
14
|
}: IBuildDocsParams): Promise<void>;
|
package/dist/types/index.d.ts
CHANGED
@@ -11,8 +11,10 @@ declare const _default: import("@modern-js/core").AsyncPlugin<Partial<import("@m
|
|
11
11
|
watchFiles: import("@modern-js/core").ParallelWorkflow<void, unknown>;
|
12
12
|
fileChange: import("@modern-js/core").AsyncWorkflow<{
|
13
13
|
filename: string;
|
14
|
+
eventType: "add" | "unlink" | "change";
|
14
15
|
}, void>;
|
15
16
|
beforeExit: import("@modern-js/core").AsyncWorkflow<void, void>;
|
17
|
+
beforeRestart: import("@modern-js/core").AsyncWorkflow<void, void>;
|
16
18
|
} & import("@modern-js/core").ClearDraftProgress<import("@modern-js/core").Hooks>>>>;
|
17
19
|
|
18
20
|
export default _default;
|
package/package.json
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
"modern",
|
12
12
|
"modern.js"
|
13
13
|
],
|
14
|
-
"version": "0.0.0-canary-
|
14
|
+
"version": "0.0.0-canary-20220210161443",
|
15
15
|
"jsnext:source": "./src/index.ts",
|
16
16
|
"types": "./dist/types/index.d.ts",
|
17
17
|
"main": "./dist/js/node/index.js",
|
@@ -37,8 +37,8 @@
|
|
37
37
|
"@babel/runtime": "^7",
|
38
38
|
"@mdx-js/mdx": "^1.6.22",
|
39
39
|
"@mdx-js/react": "^1.6.22",
|
40
|
-
"@modern-js/utils": "^0.0.0-canary-
|
41
|
-
"@modern-js/webpack": "^0.0.0-canary-
|
40
|
+
"@modern-js/utils": "^0.0.0-canary-20220210161443",
|
41
|
+
"@modern-js/webpack": "^0.0.0-canary-20220210161443",
|
42
42
|
"antd": "^4.16.13",
|
43
43
|
"chokidar": "^3.5.2",
|
44
44
|
"core-js": "^3.17.2",
|
@@ -62,7 +62,7 @@
|
|
62
62
|
"webpack-dev-server": "^4.1.1"
|
63
63
|
},
|
64
64
|
"devDependencies": {
|
65
|
-
"@modern-js/module-tools-hooks": "^
|
65
|
+
"@modern-js/module-tools-hooks": "^1.2.1",
|
66
66
|
"@types/core-js": "^2.5.5",
|
67
67
|
"@types/github-slugger": "^1.3.0",
|
68
68
|
"@types/glob": "^7.1.4",
|
@@ -73,13 +73,13 @@
|
|
73
73
|
"@types/react-dom": "^17",
|
74
74
|
"@types/webpack-dev-server": "^4.1.0",
|
75
75
|
"typescript": "^4",
|
76
|
-
"@modern-js/core": "^0.0.0-canary-
|
76
|
+
"@modern-js/core": "^0.0.0-canary-20220210161443",
|
77
77
|
"@scripts/build": "0.0.0",
|
78
78
|
"jest": "^27",
|
79
79
|
"@scripts/jest-config": "0.0.0"
|
80
80
|
},
|
81
81
|
"peerDependencies": {
|
82
|
-
"@modern-js/core": "^0.0.0-canary-
|
82
|
+
"@modern-js/core": "^0.0.0-canary-20220210161443"
|
83
83
|
},
|
84
84
|
"sideEffects": false,
|
85
85
|
"modernConfig": {
|
@@ -0,0 +1,13 @@
|
|
1
|
+
{
|
2
|
+
"extends": "@modern-js/tsconfig/base",
|
3
|
+
"compilerOptions": {
|
4
|
+
"declaration": true,
|
5
|
+
"jsx": "preserve",
|
6
|
+
"baseUrl": "./",
|
7
|
+
"outDir": "./out",
|
8
|
+
"emitDeclarationOnly": true,
|
9
|
+
"isolatedModules": true,
|
10
|
+
"paths": {},
|
11
|
+
"types": ["node", "jest"]
|
12
|
+
}
|
13
|
+
}
|
@@ -1,27 +0,0 @@
|
|
1
|
-
|
2
|
-
<!DOCTYPE html>
|
3
|
-
<html>
|
4
|
-
<head>
|
5
|
-
<%= meta %>
|
6
|
-
<title><%= title %></title>
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
<script>
|
11
|
-
window.__assetPrefix__ = '<%= assetPrefix %>';
|
12
|
-
</script>
|
13
|
-
|
14
|
-
</head>
|
15
|
-
|
16
|
-
<body>
|
17
|
-
<!--<?- chunksMap.css ?>-->
|
18
|
-
<noscript>
|
19
|
-
We're sorry but react app doesn't work properly without JavaScript enabled. Please enable it to continue.
|
20
|
-
</noscript>
|
21
|
-
<div id="<%= mountId %>"><!--<?- html ?>--></div>
|
22
|
-
|
23
|
-
<!--<?- chunksMap.js ?>-->
|
24
|
-
<!--<?- SSRDataScript ?>-->
|
25
|
-
</body>
|
26
|
-
|
27
|
-
</html>
|