@modern-js/plugin-docsite 1.1.2 → 1.2.0
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 +33 -0
- package/dist/js/modern/build-task.js +9 -1
- package/dist/js/modern/features/utils/generate-files.js +2 -2
- package/dist/js/node/build-task.js +9 -1
- package/dist/js/node/features/utils/generate-files.js +2 -2
- package/dist/types/index.d.ts +3 -0
- package/jest.config.js +8 -0
- package/package.json +19 -12
- package/src/build-task.ts +6 -2
- package/tests/index.test.ts +7 -0
- package/tsconfig.json +1 -3
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,38 @@
|
|
1
1
|
# @modern-js/plugin-docsite
|
2
2
|
|
3
|
+
## 1.2.0
|
4
|
+
|
5
|
+
### Minor Changes
|
6
|
+
|
7
|
+
- cfe11628: Make Modern.js self bootstraping
|
8
|
+
|
9
|
+
### Patch Changes
|
10
|
+
|
11
|
+
- Updated dependencies [2da09c69]
|
12
|
+
- Updated dependencies [5597289b]
|
13
|
+
- Updated dependencies [fc71e36f]
|
14
|
+
- Updated dependencies [4a85378c]
|
15
|
+
- Updated dependencies [e453e421]
|
16
|
+
- Updated dependencies [c3d46ee4]
|
17
|
+
- Updated dependencies [cfe11628]
|
18
|
+
- @modern-js/utils@1.2.0
|
19
|
+
- @modern-js/webpack@1.2.0
|
20
|
+
- @modern-js/core@1.3.0
|
21
|
+
|
22
|
+
## 1.1.3
|
23
|
+
|
24
|
+
### Patch Changes
|
25
|
+
|
26
|
+
- ca7dcb32: add CORE_INIT_OPTION_FILE env
|
27
|
+
- Updated dependencies [90eeb72c]
|
28
|
+
- Updated dependencies [e04914ce]
|
29
|
+
- Updated dependencies [5a4c557e]
|
30
|
+
- Updated dependencies [e04914ce]
|
31
|
+
- Updated dependencies [ca7dcb32]
|
32
|
+
- Updated dependencies [ecb344dc]
|
33
|
+
- @modern-js/core@1.2.0
|
34
|
+
- @modern-js/utils@1.1.5
|
35
|
+
|
3
36
|
## 1.1.2
|
4
37
|
|
5
38
|
### Patch Changes
|
@@ -14,9 +14,17 @@ const taskMain = async ({
|
|
14
14
|
};
|
15
15
|
|
16
16
|
(async () => {
|
17
|
+
let options;
|
18
|
+
|
19
|
+
if (process.env.CORE_INIT_OPTION_FILE) {
|
20
|
+
({
|
21
|
+
options
|
22
|
+
} = require(process.env.CORE_INIT_OPTION_FILE));
|
23
|
+
}
|
24
|
+
|
17
25
|
const {
|
18
26
|
appContext
|
19
|
-
} = await core.cli.init();
|
27
|
+
} = await core.cli.init([], options);
|
20
28
|
await core.manager.run(async () => {
|
21
29
|
try {
|
22
30
|
await taskMain({
|
@@ -4,9 +4,9 @@ import _union from "lodash/union";
|
|
4
4
|
import _camelCase from "lodash/camelCase";
|
5
5
|
import _startCase from "lodash/startCase";
|
6
6
|
|
7
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
7
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
8
8
|
|
9
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
9
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
10
10
|
|
11
11
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
12
12
|
|
@@ -18,9 +18,17 @@ const taskMain = async ({
|
|
18
18
|
};
|
19
19
|
|
20
20
|
(async () => {
|
21
|
+
let options;
|
22
|
+
|
23
|
+
if (process.env.CORE_INIT_OPTION_FILE) {
|
24
|
+
({
|
25
|
+
options
|
26
|
+
} = require(process.env.CORE_INIT_OPTION_FILE));
|
27
|
+
}
|
28
|
+
|
21
29
|
const {
|
22
30
|
appContext
|
23
|
-
} = await core.cli.init();
|
31
|
+
} = await core.cli.init([], options);
|
24
32
|
await core.manager.run(async () => {
|
25
33
|
try {
|
26
34
|
await taskMain({
|
@@ -39,9 +39,9 @@ var _constant = require("../constant");
|
|
39
39
|
|
40
40
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
41
41
|
|
42
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
42
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
43
43
|
|
44
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
44
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
45
45
|
|
46
46
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
47
47
|
|
package/dist/types/index.d.ts
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
declare const _default: import("@modern-js/core").AsyncPlugin<Partial<import("@modern-js/core").Progresses2Threads<{
|
2
2
|
config: import("@modern-js/core").ParallelWorkflow<void, unknown>;
|
3
|
+
resolvedConfig: import("@modern-js/core").AsyncWaterfall<{
|
4
|
+
resolved: import("@modern-js/core").NormalizedConfig;
|
5
|
+
}>;
|
3
6
|
validateSchema: import("@modern-js/core").ParallelWorkflow<void, unknown>;
|
4
7
|
prepare: import("@modern-js/core").AsyncWorkflow<void, void>;
|
5
8
|
commands: import("@modern-js/core").AsyncWorkflow<{
|
package/jest.config.js
ADDED
package/package.json
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
"modern",
|
12
12
|
"modern.js"
|
13
13
|
],
|
14
|
-
"version": "1.
|
14
|
+
"version": "1.2.0",
|
15
15
|
"jsnext:source": "./src/index.ts",
|
16
16
|
"types": "./dist/types/index.d.ts",
|
17
17
|
"main": "./dist/js/node/index.js",
|
@@ -20,12 +20,16 @@
|
|
20
20
|
"exports": {
|
21
21
|
".": {
|
22
22
|
"node": {
|
23
|
+
"jsnext:source": "./src/index.ts",
|
23
24
|
"import": "./dist/js/modern/index.js",
|
24
25
|
"require": "./dist/js/node/index.js"
|
25
26
|
},
|
26
27
|
"default": "./dist/js/treeshaking/index.js"
|
27
28
|
},
|
28
|
-
"./cli":
|
29
|
+
"./cli": {
|
30
|
+
"jsnext:source": "./src/index.ts",
|
31
|
+
"default": "./dist/js/node/index.js"
|
32
|
+
},
|
29
33
|
"./package.json": "./package.json"
|
30
34
|
},
|
31
35
|
"dependencies": {
|
@@ -33,8 +37,8 @@
|
|
33
37
|
"@babel/runtime": "^7",
|
34
38
|
"@mdx-js/mdx": "^1.6.22",
|
35
39
|
"@mdx-js/react": "^1.6.22",
|
36
|
-
"@modern-js/utils": "^1.
|
37
|
-
"@modern-js/webpack": "^1.
|
40
|
+
"@modern-js/utils": "^1.2.0",
|
41
|
+
"@modern-js/webpack": "^1.2.0",
|
38
42
|
"antd": "^4.16.13",
|
39
43
|
"chokidar": "^3.5.2",
|
40
44
|
"core-js": "^3.17.2",
|
@@ -58,7 +62,7 @@
|
|
58
62
|
"webpack-dev-server": "^4.1.1"
|
59
63
|
},
|
60
64
|
"devDependencies": {
|
61
|
-
"@modern-js/module-tools-hooks": "^1.
|
65
|
+
"@modern-js/module-tools-hooks": "^1.2.0",
|
62
66
|
"@types/core-js": "^2.5.5",
|
63
67
|
"@types/github-slugger": "^1.3.0",
|
64
68
|
"@types/glob": "^7.1.4",
|
@@ -69,12 +73,13 @@
|
|
69
73
|
"@types/react-dom": "^17",
|
70
74
|
"@types/webpack-dev-server": "^4.1.0",
|
71
75
|
"typescript": "^4",
|
72
|
-
"@modern-js/core": "^1.
|
73
|
-
"@
|
74
|
-
"
|
76
|
+
"@modern-js/core": "^1.3.0",
|
77
|
+
"@scripts/build": "0.0.0",
|
78
|
+
"jest": "^27",
|
79
|
+
"@scripts/jest-config": "0.0.0"
|
75
80
|
},
|
76
81
|
"peerDependencies": {
|
77
|
-
"@modern-js/core": "^1.
|
82
|
+
"@modern-js/core": "^1.3.0"
|
78
83
|
},
|
79
84
|
"sideEffects": false,
|
80
85
|
"modernConfig": {
|
@@ -90,11 +95,13 @@
|
|
90
95
|
},
|
91
96
|
"publishConfig": {
|
92
97
|
"registry": "https://registry.npmjs.org/",
|
93
|
-
"access": "public"
|
98
|
+
"access": "public",
|
99
|
+
"types": "./dist/types/index.d.ts"
|
94
100
|
},
|
95
101
|
"scripts": {
|
96
102
|
"new": "modern new",
|
97
103
|
"build": "modern build",
|
98
|
-
"test": "
|
99
|
-
}
|
104
|
+
"test": "jest --passWithNoTests"
|
105
|
+
},
|
106
|
+
"readme": "\n<p align=\"center\">\n <a href=\"https://modernjs.dev\" target=\"blank\"><img src=\"https://lf3-static.bytednsdoc.com/obj/eden-cn/ylaelkeh7nuhfnuhf/modernjs-cover.png\" width=\"300\" alt=\"Modern.js Logo\" /></a>\n</p>\n<p align=\"center\">\n现代 Web 工程体系\n <br/>\n <a href=\"https://modernjs.dev\" target=\"blank\">\n modernjs.dev\n </a>\n</p>\n<p align=\"center\">\n The meta-framework suite designed from scratch for frontend-focused modern web development\n</p>\n\n# Introduction\n\n> The doc site ([modernjs.dev](https://modernjs.dev)) and articles are only available in Chinese for now, we are planning to add English versions soon.\n\n- [Modern.js: Hello, World!](https://zhuanlan.zhihu.com/p/426707646)\n\n## Getting Started\n\n- [Quick Start](https://modernjs.dev/docs/start)\n- [Guides](https://modernjs.dev/docs/guides)\n- [API References](https://modernjs.dev/docs/apis)\n\n## Contributing\n\n- [Contributing Guide](https://github.com/modern-js-dev/modern.js/blob/main/CONTRIBUTING.md)\n"
|
100
107
|
}
|
package/src/build-task.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { IAppContext } from '@modern-js/core';
|
1
|
+
import type { IAppContext, CoreOptions } from '@modern-js/core';
|
2
2
|
import { Import } from '@modern-js/utils';
|
3
3
|
|
4
4
|
const core: typeof import('@modern-js/core') = Import.lazy(
|
@@ -20,7 +20,11 @@ const taskMain = async ({ appContext }: IBuildTaskOption) => {
|
|
20
20
|
};
|
21
21
|
|
22
22
|
(async () => {
|
23
|
-
|
23
|
+
let options: CoreOptions | undefined;
|
24
|
+
if (process.env.CORE_INIT_OPTION_FILE) {
|
25
|
+
({ options } = require(process.env.CORE_INIT_OPTION_FILE));
|
26
|
+
}
|
27
|
+
const { appContext } = await core.cli.init([], options);
|
24
28
|
await core.manager.run(async () => {
|
25
29
|
try {
|
26
30
|
await taskMain({ appContext });
|