@modern-js/plugin-docsite 1.2.2 → 1.2.5
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 +46 -0
- package/dist/js/modern/features/utils/chokidar.js +1 -2
- package/dist/js/modern/index.js +46 -44
- package/dist/js/node/features/utils/chokidar.js +1 -2
- package/dist/js/node/index.js +45 -44
- package/dist/types/index.d.ts +3 -18
- package/jest.config.js +0 -1
- package/package.json +9 -15
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,51 @@
|
|
1
1
|
# @modern-js/plugin-docsite
|
2
2
|
|
3
|
+
## 1.2.5
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- bebb39b6: chore: improve devDependencies and peerDependencies
|
8
|
+
- 133a5dd7: remove module hooks dep
|
9
|
+
- Updated dependencies [bebb39b6]
|
10
|
+
- Updated dependencies [4b4e73b7]
|
11
|
+
- Updated dependencies [da60172c]
|
12
|
+
- Updated dependencies [6cff93dc]
|
13
|
+
- Updated dependencies [132f7b53]
|
14
|
+
- Updated dependencies [9d4a005b]
|
15
|
+
- @modern-js/webpack@1.5.3
|
16
|
+
- @modern-js/utils@1.3.7
|
17
|
+
|
18
|
+
## 1.2.4
|
19
|
+
|
20
|
+
### Patch Changes
|
21
|
+
|
22
|
+
- 3e6d9f6d: convert to new plugin
|
23
|
+
- 681a1ff9: feat: remove unnecessary peerDependencies
|
24
|
+
- Updated dependencies [c2046f37]
|
25
|
+
- Updated dependencies [66cbef42]
|
26
|
+
- @modern-js/utils@1.3.6
|
27
|
+
- @modern-js/webpack@1.5.0
|
28
|
+
|
29
|
+
## 1.2.3
|
30
|
+
|
31
|
+
### Patch Changes
|
32
|
+
|
33
|
+
- 969f172f: fix port problem
|
34
|
+
- Updated dependencies [969f172f]
|
35
|
+
- Updated dependencies [0ad75faa]
|
36
|
+
- Updated dependencies [4c792f68]
|
37
|
+
- Updated dependencies [4b5d4bf4]
|
38
|
+
- Updated dependencies [0ad75faa]
|
39
|
+
- Updated dependencies [62f5b8c8]
|
40
|
+
- Updated dependencies [55e18278]
|
41
|
+
- Updated dependencies [4499a674]
|
42
|
+
- Updated dependencies [0ad75faa]
|
43
|
+
- Updated dependencies [403f5169]
|
44
|
+
- Updated dependencies [a7f42f48]
|
45
|
+
- @modern-js/core@1.4.4
|
46
|
+
- @modern-js/webpack@1.4.1
|
47
|
+
- @modern-js/utils@1.3.3
|
48
|
+
|
3
49
|
## 1.2.2
|
4
50
|
|
5
51
|
### Patch Changes
|
@@ -24,8 +24,7 @@ export function chokidarFile(appDirectory, tmpDir, isDev) {
|
|
24
24
|
if (files.length) {
|
25
25
|
await generateFiles(appDirectory, tmpDir, files, isDev);
|
26
26
|
logger.info('built');
|
27
|
-
}
|
28
|
-
|
27
|
+
}
|
29
28
|
|
30
29
|
building = false;
|
31
30
|
|
package/dist/js/modern/index.js
CHANGED
@@ -1,53 +1,55 @@
|
|
1
1
|
import { Import } from '@modern-js/utils';
|
2
|
-
const core = Import.lazy('@modern-js/core', require);
|
3
2
|
const features = Import.lazy('./features', require);
|
4
|
-
export default
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
3
|
+
export default (() => ({
|
4
|
+
name: '@modern-js/plugin-docsite',
|
5
|
+
setup: api => ({
|
6
|
+
commands({
|
7
|
+
program
|
8
|
+
}) {
|
9
|
+
const {
|
10
|
+
appDirectory,
|
11
|
+
internalDirectory
|
12
|
+
} = api.useAppContext();
|
13
|
+
const devCommand = program.commandsMap.get('dev');
|
13
14
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
15
|
+
if (devCommand) {
|
16
|
+
devCommand.command('docs').action(async () => {
|
17
|
+
await features.buildDocs({
|
18
|
+
appDirectory,
|
19
|
+
internalDirectory,
|
20
|
+
isDev: true
|
21
|
+
});
|
20
22
|
});
|
21
|
-
}
|
22
|
-
}
|
23
|
-
},
|
23
|
+
}
|
24
|
+
},
|
24
25
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
appDirectory,
|
29
|
-
internalDirectory
|
30
|
-
} = core.useAppContext();
|
31
|
-
return {
|
32
|
-
name: 'Docsite 调试',
|
33
|
-
value: 'docsite',
|
34
|
-
runTask: async () => features.buildDocs({
|
26
|
+
// module-tools menu mode
|
27
|
+
moduleToolsMenu() {
|
28
|
+
const {
|
35
29
|
appDirectory,
|
36
30
|
internalDirectory,
|
37
|
-
|
38
|
-
})
|
39
|
-
|
40
|
-
|
31
|
+
port
|
32
|
+
} = api.useAppContext();
|
33
|
+
return {
|
34
|
+
name: 'Docsite 调试',
|
35
|
+
value: 'docsite',
|
36
|
+
runTask: async () => features.buildDocs({
|
37
|
+
appDirectory,
|
38
|
+
internalDirectory,
|
39
|
+
isDev: true,
|
40
|
+
port
|
41
|
+
})
|
42
|
+
};
|
43
|
+
},
|
41
44
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
45
|
+
platformBuild() {
|
46
|
+
return {
|
47
|
+
name: 'docsite',
|
48
|
+
title: 'Run Docsite log',
|
49
|
+
taskPath: require.resolve("./build-task"),
|
50
|
+
params: []
|
51
|
+
};
|
52
|
+
}
|
50
53
|
|
51
|
-
})
|
52
|
-
|
53
|
-
});
|
54
|
+
})
|
55
|
+
}));
|
@@ -42,8 +42,7 @@ function chokidarFile(appDirectory, tmpDir, isDev) {
|
|
42
42
|
await (0, _generateFiles.generateFiles)(appDirectory, tmpDir, files, isDev);
|
43
43
|
|
44
44
|
_utils.logger.info('built');
|
45
|
-
}
|
46
|
-
|
45
|
+
}
|
47
46
|
|
48
47
|
building = false;
|
49
48
|
|
package/dist/js/node/index.js
CHANGED
@@ -7,59 +7,60 @@ exports.default = void 0;
|
|
7
7
|
|
8
8
|
var _utils = require("@modern-js/utils");
|
9
9
|
|
10
|
-
const core = _utils.Import.lazy('@modern-js/core', require);
|
11
|
-
|
12
10
|
const features = _utils.Import.lazy('./features', require);
|
13
11
|
|
14
|
-
var _default =
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
12
|
+
var _default = () => ({
|
13
|
+
name: '@modern-js/plugin-docsite',
|
14
|
+
setup: api => ({
|
15
|
+
commands({
|
16
|
+
program
|
17
|
+
}) {
|
18
|
+
const {
|
19
|
+
appDirectory,
|
20
|
+
internalDirectory
|
21
|
+
} = api.useAppContext();
|
22
|
+
const devCommand = program.commandsMap.get('dev');
|
23
23
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
24
|
+
if (devCommand) {
|
25
|
+
devCommand.command('docs').action(async () => {
|
26
|
+
await features.buildDocs({
|
27
|
+
appDirectory,
|
28
|
+
internalDirectory,
|
29
|
+
isDev: true
|
30
|
+
});
|
30
31
|
});
|
31
|
-
}
|
32
|
-
}
|
33
|
-
},
|
32
|
+
}
|
33
|
+
},
|
34
34
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
appDirectory,
|
39
|
-
internalDirectory
|
40
|
-
} = core.useAppContext();
|
41
|
-
return {
|
42
|
-
name: 'Docsite 调试',
|
43
|
-
value: 'docsite',
|
44
|
-
runTask: async () => features.buildDocs({
|
35
|
+
// module-tools menu mode
|
36
|
+
moduleToolsMenu() {
|
37
|
+
const {
|
45
38
|
appDirectory,
|
46
39
|
internalDirectory,
|
47
|
-
|
48
|
-
})
|
49
|
-
|
50
|
-
|
40
|
+
port
|
41
|
+
} = api.useAppContext();
|
42
|
+
return {
|
43
|
+
name: 'Docsite 调试',
|
44
|
+
value: 'docsite',
|
45
|
+
runTask: async () => features.buildDocs({
|
46
|
+
appDirectory,
|
47
|
+
internalDirectory,
|
48
|
+
isDev: true,
|
49
|
+
port
|
50
|
+
})
|
51
|
+
};
|
52
|
+
},
|
51
53
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
54
|
+
platformBuild() {
|
55
|
+
return {
|
56
|
+
name: 'docsite',
|
57
|
+
title: 'Run Docsite log',
|
58
|
+
taskPath: require.resolve("./build-task"),
|
59
|
+
params: []
|
60
|
+
};
|
61
|
+
}
|
60
62
|
|
61
|
-
})
|
62
|
-
name: '@modern-js/plugin-docsite'
|
63
|
+
})
|
63
64
|
});
|
64
65
|
|
65
66
|
exports.default = _default;
|
package/dist/types/index.d.ts
CHANGED
@@ -1,20 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
resolved: import("@modern-js/core").NormalizedConfig;
|
5
|
-
}>;
|
6
|
-
validateSchema: import("@modern-js/core").ParallelWorkflow<void, unknown>;
|
7
|
-
prepare: import("@modern-js/core").AsyncWorkflow<void, void>;
|
8
|
-
commands: import("@modern-js/core").AsyncWorkflow<{
|
9
|
-
program: import("commander").Command;
|
10
|
-
}, void>;
|
11
|
-
watchFiles: import("@modern-js/core").ParallelWorkflow<void, unknown>;
|
12
|
-
fileChange: import("@modern-js/core").AsyncWorkflow<{
|
13
|
-
filename: string;
|
14
|
-
eventType: "add" | "unlink" | "change";
|
15
|
-
}, void>;
|
16
|
-
beforeExit: import("@modern-js/core").AsyncWorkflow<void, void>;
|
17
|
-
beforeRestart: import("@modern-js/core").AsyncWorkflow<void, void>;
|
18
|
-
} & import("@modern-js/core").ClearDraftProgress<import("@modern-js/core").Hooks>>>>;
|
1
|
+
import type { CliPlugin } from '@modern-js/core';
|
2
|
+
|
3
|
+
declare const _default: () => CliPlugin;
|
19
4
|
|
20
5
|
export default _default;
|
package/jest.config.js
CHANGED
package/package.json
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
"modern",
|
12
12
|
"modern.js"
|
13
13
|
],
|
14
|
-
"version": "1.2.
|
14
|
+
"version": "1.2.5",
|
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": "^1.3.
|
41
|
-
"@modern-js/webpack": "^1.3
|
40
|
+
"@modern-js/utils": "^1.3.7",
|
41
|
+
"@modern-js/webpack": "^1.5.3",
|
42
42
|
"antd": "^4.16.13",
|
43
43
|
"chokidar": "^3.5.2",
|
44
44
|
"core-js": "^3.17.2",
|
@@ -55,14 +55,15 @@
|
|
55
55
|
"react-live": "^2.3.0",
|
56
56
|
"react-router-dom": "^5.3.0",
|
57
57
|
"sort-paths": "^1.1.1",
|
58
|
-
"styled-components": "^5.3.1",
|
59
58
|
"unist-builder": "^2.0.3",
|
60
59
|
"unist-util-visit": "^2.0.3",
|
61
|
-
"webpack": "^5.
|
60
|
+
"webpack": "^5.71.0",
|
62
61
|
"webpack-dev-server": "^4.1.1"
|
63
62
|
},
|
64
63
|
"devDependencies": {
|
65
|
-
"@modern-js/
|
64
|
+
"@modern-js/core": "1.6.1",
|
65
|
+
"@scripts/build": "0.0.0",
|
66
|
+
"@scripts/jest-config": "0.0.0",
|
66
67
|
"@types/core-js": "^2.5.5",
|
67
68
|
"@types/github-slugger": "^1.3.0",
|
68
69
|
"@types/glob": "^7.1.4",
|
@@ -72,14 +73,8 @@
|
|
72
73
|
"@types/react": "^17",
|
73
74
|
"@types/react-dom": "^17",
|
74
75
|
"@types/webpack-dev-server": "^4.1.0",
|
75
|
-
"typescript": "^4",
|
76
|
-
"@modern-js/core": "^1.4.0",
|
77
|
-
"@scripts/build": "0.0.0",
|
78
76
|
"jest": "^27",
|
79
|
-
"
|
80
|
-
},
|
81
|
-
"peerDependencies": {
|
82
|
-
"@modern-js/core": "^1.4.0"
|
77
|
+
"typescript": "^4"
|
83
78
|
},
|
84
79
|
"sideEffects": false,
|
85
80
|
"modernConfig": {
|
@@ -95,8 +90,7 @@
|
|
95
90
|
},
|
96
91
|
"publishConfig": {
|
97
92
|
"registry": "https://registry.npmjs.org/",
|
98
|
-
"access": "public"
|
99
|
-
"types": "./dist/types/index.d.ts"
|
93
|
+
"access": "public"
|
100
94
|
},
|
101
95
|
"scripts": {
|
102
96
|
"new": "modern new",
|