@modern-js/plugin-docsite 1.2.3 → 1.2.4
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +11 -0
- package/dist/js/modern/index.js +45 -45
- package/dist/js/node/index.js +44 -45
- package/dist/types/index.d.ts +3 -18
- package/package.json +5 -8
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
# @modern-js/plugin-docsite
|
2
2
|
|
3
|
+
## 1.2.4
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 3e6d9f6d: convert to new plugin
|
8
|
+
- 681a1ff9: feat: remove unnecessary peerDependencies
|
9
|
+
- Updated dependencies [c2046f37]
|
10
|
+
- Updated dependencies [66cbef42]
|
11
|
+
- @modern-js/utils@1.3.6
|
12
|
+
- @modern-js/webpack@1.5.0
|
13
|
+
|
3
14
|
## 1.2.3
|
4
15
|
|
5
16
|
### Patch Changes
|
package/dist/js/modern/index.js
CHANGED
@@ -1,55 +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
|
-
port
|
31
|
-
} = core.useAppContext();
|
32
|
-
return {
|
33
|
-
name: 'Docsite 调试',
|
34
|
-
value: 'docsite',
|
35
|
-
runTask: async () => features.buildDocs({
|
26
|
+
// module-tools menu mode
|
27
|
+
moduleToolsMenu() {
|
28
|
+
const {
|
36
29
|
appDirectory,
|
37
30
|
internalDirectory,
|
38
|
-
isDev: true,
|
39
31
|
port
|
40
|
-
})
|
41
|
-
|
42
|
-
|
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
|
+
},
|
43
44
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
45
|
+
platformBuild() {
|
46
|
+
return {
|
47
|
+
name: 'docsite',
|
48
|
+
title: 'Run Docsite log',
|
49
|
+
taskPath: require.resolve("./build-task"),
|
50
|
+
params: []
|
51
|
+
};
|
52
|
+
}
|
52
53
|
|
53
|
-
})
|
54
|
-
|
55
|
-
});
|
54
|
+
})
|
55
|
+
}));
|
package/dist/js/node/index.js
CHANGED
@@ -7,61 +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
|
-
port
|
41
|
-
} = core.useAppContext();
|
42
|
-
return {
|
43
|
-
name: 'Docsite 调试',
|
44
|
-
value: 'docsite',
|
45
|
-
runTask: async () => features.buildDocs({
|
35
|
+
// module-tools menu mode
|
36
|
+
moduleToolsMenu() {
|
37
|
+
const {
|
46
38
|
appDirectory,
|
47
39
|
internalDirectory,
|
48
|
-
isDev: true,
|
49
40
|
port
|
50
|
-
})
|
51
|
-
|
52
|
-
|
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
|
+
},
|
53
53
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
54
|
+
platformBuild() {
|
55
|
+
return {
|
56
|
+
name: 'docsite',
|
57
|
+
title: 'Run Docsite log',
|
58
|
+
taskPath: require.resolve("./build-task"),
|
59
|
+
params: []
|
60
|
+
};
|
61
|
+
}
|
62
62
|
|
63
|
-
})
|
64
|
-
name: '@modern-js/plugin-docsite'
|
63
|
+
})
|
65
64
|
});
|
66
65
|
|
67
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/package.json
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
"modern",
|
12
12
|
"modern.js"
|
13
13
|
],
|
14
|
-
"version": "1.2.
|
14
|
+
"version": "1.2.4",
|
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.
|
40
|
+
"@modern-js/utils": "^1.3.6",
|
41
|
+
"@modern-js/webpack": "^1.5.0",
|
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": "^1.2.
|
65
|
+
"@modern-js/module-tools-hooks": "^1.2.3",
|
66
66
|
"@types/core-js": "^2.5.5",
|
67
67
|
"@types/github-slugger": "^1.3.0",
|
68
68
|
"@types/glob": "^7.1.4",
|
@@ -73,14 +73,11 @@
|
|
73
73
|
"@types/react-dom": "^17",
|
74
74
|
"@types/webpack-dev-server": "^4.1.0",
|
75
75
|
"typescript": "^4",
|
76
|
-
"@modern-js/core": "^1.
|
76
|
+
"@modern-js/core": "^1.6.0",
|
77
77
|
"@scripts/build": "0.0.0",
|
78
78
|
"jest": "^27",
|
79
79
|
"@scripts/jest-config": "0.0.0"
|
80
80
|
},
|
81
|
-
"peerDependencies": {
|
82
|
-
"@modern-js/core": "^1.4.4"
|
83
|
-
},
|
84
81
|
"sideEffects": false,
|
85
82
|
"modernConfig": {
|
86
83
|
"output": {
|