@modern-js/app-tools 1.0.0-rc.10 → 1.0.0-rc.14

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 CHANGED
@@ -1,5 +1,89 @@
1
1
  # @modern-js/app-tools
2
2
 
3
+ ## 1.0.0-rc.14
4
+
5
+ ### Patch Changes
6
+
7
+ - 224f7fe: fix server route match
8
+ - 204c626: feat: initial
9
+ - Updated dependencies [224f7fe]
10
+ - Updated dependencies [204c626]
11
+ - @modern-js/core@1.0.0-rc.14
12
+ - @modern-js/i18n-cli-language-detector@1.0.0-rc.14
13
+ - @modern-js/plugin-analyze@1.0.0-rc.14
14
+ - @modern-js/plugin-fast-refresh@1.0.0-rc.14
15
+ - @modern-js/plugin-i18n@1.0.0-rc.14
16
+ - @modern-js/webpack@1.0.0-rc.14
17
+ - @modern-js/new-action@1.0.0-rc.14
18
+ - @modern-js/plugin-polyfill@1.0.0-rc.14
19
+ - @modern-js/server@1.0.0-rc.14
20
+ - @modern-js/plugin@1.0.0-rc.14
21
+ - @modern-js/types@1.0.0-rc.14
22
+ - @modern-js/utils@1.0.0-rc.14
23
+
24
+ ## 1.0.0-rc.13
25
+
26
+ ### Patch Changes
27
+
28
+ - 224f7fe: fix server route match
29
+ - 204c626: feat: initial
30
+ - Updated dependencies [224f7fe]
31
+ - Updated dependencies [204c626]
32
+ - @modern-js/core@1.0.0-rc.13
33
+ - @modern-js/i18n-cli-language-detector@1.0.0-rc.13
34
+ - @modern-js/plugin-analyze@1.0.0-rc.13
35
+ - @modern-js/plugin-fast-refresh@1.0.0-rc.13
36
+ - @modern-js/plugin-i18n@1.0.0-rc.13
37
+ - @modern-js/webpack@1.0.0-rc.13
38
+ - @modern-js/new-action@1.0.0-rc.13
39
+ - @modern-js/plugin-polyfill@1.0.0-rc.13
40
+ - @modern-js/server@1.0.0-rc.13
41
+ - @modern-js/plugin@1.0.0-rc.13
42
+ - @modern-js/types@1.0.0-rc.13
43
+ - @modern-js/utils@1.0.0-rc.13
44
+
45
+ ## 1.0.0-rc.12
46
+
47
+ ### Patch Changes
48
+
49
+ - 224f7fe: fix server route match
50
+ - 204c626: feat: initial
51
+ - Updated dependencies [224f7fe]
52
+ - Updated dependencies [204c626]
53
+ - @modern-js/core@1.0.0-rc.12
54
+ - @modern-js/i18n-cli-language-detector@1.0.0-rc.12
55
+ - @modern-js/plugin-analyze@1.0.0-rc.12
56
+ - @modern-js/plugin-fast-refresh@1.0.0-rc.12
57
+ - @modern-js/plugin-i18n@1.0.0-rc.12
58
+ - @modern-js/webpack@1.0.0-rc.12
59
+ - @modern-js/new-action@1.0.0-rc.12
60
+ - @modern-js/plugin-polyfill@1.0.0-rc.12
61
+ - @modern-js/server@1.0.0-rc.12
62
+ - @modern-js/plugin@1.0.0-rc.12
63
+ - @modern-js/types@1.0.0-rc.12
64
+ - @modern-js/utils@1.0.0-rc.12
65
+
66
+ ## 1.0.0-rc.11
67
+
68
+ ### Patch Changes
69
+
70
+ - 224f7fe: fix server route match
71
+ - 204c626: feat: initial
72
+ - Updated dependencies [224f7fe]
73
+ - Updated dependencies [204c626]
74
+ - @modern-js/core@1.0.0-rc.11
75
+ - @modern-js/i18n-cli-language-detector@1.0.0-rc.11
76
+ - @modern-js/plugin-analyze@1.0.0-rc.11
77
+ - @modern-js/plugin-fast-refresh@1.0.0-rc.11
78
+ - @modern-js/plugin-i18n@1.0.0-rc.11
79
+ - @modern-js/webpack@1.0.0-rc.11
80
+ - @modern-js/new-action@1.0.0-rc.11
81
+ - @modern-js/plugin-polyfill@1.0.0-rc.11
82
+ - @modern-js/server@1.0.0-rc.11
83
+ - @modern-js/plugin@1.0.0-rc.11
84
+ - @modern-js/types@1.0.0-rc.11
85
+ - @modern-js/utils@1.0.0-rc.11
86
+
3
87
  ## 1.0.0-rc.10
4
88
 
5
89
  ### Patch Changes
package/README.md CHANGED
@@ -3,30 +3,22 @@
3
3
  <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>
4
4
  </p>
5
5
 
6
- <p align="center">现代 Web 工程体系</p>
6
+ <p align="center">
7
+ 现代 Web 工程体系
8
+ <br/>
9
+ <a href="https://modernjs.dev" target="blank">
10
+ modernjs.dev
11
+ </a>
12
+ </p>
13
+
7
14
 
8
- ## 背景
15
+ ## 参考链接
9
16
  - [迈入现代 Web 开发](https://zhuanlan.zhihu.com/p/386607009)
10
17
  - [现代 Web 开发者问卷调查报告](https://zhuanlan.zhihu.com/p/403206195)
18
+ - [字节跳动是如何落地微前端的](https://mp.weixin.qq.com/s/L9wbfNG5fTXF5bx7dcgj4Q)
11
19
 
12
- ## 计划
13
-
14
- Modern.js 的 1.0.0.rc 版已经发到 npm,目前在做测试改进,README 文档之后统一提供(现阶段加入测试和开发,可以发 [issue](https://github.com/modern-js-dev/modern.js/issues) 留微信联系),完整的文档站计划在10月14日上线
15
-
16
-
17
-
18
-
19
-
20
-
21
-
22
-
23
-
24
-
25
-
26
-
27
-
28
-
29
-
30
-
20
+ ## 近期计划
31
21
 
22
+ Modern.js 的 1.0.0.rc 版已经发到 npm,目前在做测试改进和文档建设。
32
23
 
24
+ README、完整的文档站、介绍等,都计划在 10 月 27 日上线。
@@ -43,7 +43,8 @@ export const dev = async () => {
43
43
  },
44
44
  hot: true,
45
45
  liveReload: true,
46
- port
46
+ port,
47
+ https: userConfig.dev.https
47
48
  }), userConfig.tools.devServer),
48
49
  compiler,
49
50
  pwd: appDirectory,
@@ -23,6 +23,6 @@ export const start = async () => {
23
23
  throw err;
24
24
  }
25
25
 
26
- await printInstructions(appContext);
26
+ await printInstructions(appContext, userConfig);
27
27
  });
28
28
  };
@@ -12,7 +12,7 @@ const prettyTime = stats => {
12
12
  export const createCompiler = async ({
13
13
  webpackConfigs,
14
14
  // TODO: params
15
- userConfig: _userConfig,
15
+ userConfig,
16
16
  appContext
17
17
  }) => {
18
18
  try {
@@ -56,7 +56,7 @@ export const createCompiler = async ({
56
56
  logger.log(chalk.green(`Compiled successfully in ${prettyTime(statsData)} ms.\n`));
57
57
  }
58
58
 
59
- await printInstructions(appContext);
59
+ await printInstructions(appContext, userConfig);
60
60
  } // eslint-disable-next-line require-atomic-updates
61
61
 
62
62
 
@@ -1,7 +1,7 @@
1
1
  import { prettyInstructions, logger, isDev, chalk } from '@modern-js/utils';
2
2
  import { mountHook } from '@modern-js/core';
3
- export const printInstructions = async appContext => {
4
- let message = prettyInstructions(appContext);
3
+ export const printInstructions = async (appContext, config) => {
4
+ let message = prettyInstructions(appContext, config);
5
5
 
6
6
  if (isDev()) {
7
7
  message += `\n${chalk.cyanBright([`Note that the development build is not optimized.`, `To create a production build, use yarn build.`].join('\n'))}`;
@@ -57,7 +57,8 @@ const dev = async () => {
57
57
  },
58
58
  hot: true,
59
59
  liveReload: true,
60
- port
60
+ port,
61
+ https: userConfig.dev.https
61
62
  }), userConfig.tools.devServer),
62
63
  compiler,
63
64
  pwd: appDirectory,
@@ -38,7 +38,7 @@ const start = async () => {
38
38
  throw err;
39
39
  }
40
40
 
41
- await (0, _printInstructions.printInstructions)(appContext);
41
+ await (0, _printInstructions.printInstructions)(appContext, userConfig);
42
42
  });
43
43
  };
44
44
 
@@ -24,7 +24,7 @@ const prettyTime = stats => {
24
24
  const createCompiler = async ({
25
25
  webpackConfigs,
26
26
  // TODO: params
27
- userConfig: _userConfig,
27
+ userConfig,
28
28
  appContext
29
29
  }) => {
30
30
  try {
@@ -73,7 +73,7 @@ const createCompiler = async ({
73
73
  _utils.logger.log(_utils.chalk.green(`Compiled successfully in ${prettyTime(statsData)} ms.\n`));
74
74
  }
75
75
 
76
- await (0, _printInstructions.printInstructions)(appContext);
76
+ await (0, _printInstructions.printInstructions)(appContext, userConfig);
77
77
  } // eslint-disable-next-line require-atomic-updates
78
78
 
79
79
 
@@ -9,8 +9,8 @@ var _utils = require("@modern-js/utils");
9
9
 
10
10
  var _core = require("@modern-js/core");
11
11
 
12
- const printInstructions = async appContext => {
13
- let message = (0, _utils.prettyInstructions)(appContext);
12
+ const printInstructions = async (appContext, config) => {
13
+ let message = (0, _utils.prettyInstructions)(appContext, config);
14
14
 
15
15
  if ((0, _utils.isDev)()) {
16
16
  message += `\n${_utils.chalk.cyanBright([`Note that the development build is not optimized.`, `To create a production build, use yarn build.`].join('\n'))}`;
@@ -1,18 +1,18 @@
1
1
  import { defineConfig } from '@modern-js/core';
2
2
  export { defineConfig };
3
3
 
4
- declare const _default: import("@modern-js/plugin").AsyncPlugin<Partial<import("@modern-js/plugin").Progresses2Threads<{
5
- config: import("@modern-js/plugin").ParallelWorkflow<void, unknown>;
6
- validateSchema: import("@modern-js/plugin").ParallelWorkflow<void, unknown>;
7
- prepare: import("@modern-js/plugin").AsyncWorkflow<void, void>;
8
- commands: import("@modern-js/plugin").AsyncWorkflow<{
4
+ declare const _default: import("@modern-js/core").AsyncPlugin<Partial<import("@modern-js/core").Progresses2Threads<{
5
+ config: import("@modern-js/core").ParallelWorkflow<void, unknown>;
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
9
  program: import("commander").Command;
10
10
  }, void>;
11
- watchFiles: import("@modern-js/plugin").ParallelWorkflow<void, unknown>;
12
- fileChange: import("@modern-js/plugin").AsyncWorkflow<{
11
+ watchFiles: import("@modern-js/core").ParallelWorkflow<void, unknown>;
12
+ fileChange: import("@modern-js/core").AsyncWorkflow<{
13
13
  filename: string;
14
14
  }, void>;
15
- beforeExit: import("@modern-js/plugin").AsyncWorkflow<void, void>;
16
- } & import("@modern-js/plugin").ClearDraftProgress<import("@modern-js/core").Hooks>>>>;
15
+ beforeExit: import("@modern-js/core").AsyncWorkflow<void, void>;
16
+ } & import("@modern-js/core").ClearDraftProgress<import("@modern-js/core").Hooks>>>>;
17
17
 
18
18
  export default _default;
@@ -2,7 +2,7 @@ import webpack, { Configuration } from 'webpack';
2
2
  import { IAppContext, NormalizedConfig } from '@modern-js/core';
3
3
  export declare const createCompiler: ({
4
4
  webpackConfigs,
5
- userConfig: _userConfig,
5
+ userConfig,
6
6
  appContext
7
7
  }: {
8
8
  webpackConfigs: Configuration[];
@@ -1,2 +1,2 @@
1
- import { IAppContext } from '@modern-js/core';
2
- export declare const printInstructions: (appContext: IAppContext) => Promise<void>;
1
+ import { IAppContext, NormalizedConfig } from '@modern-js/core';
2
+ export declare const printInstructions: (appContext: IAppContext, config: NormalizedConfig) => Promise<void>;
package/lib/types.d.ts CHANGED
@@ -2,10 +2,6 @@
2
2
  /// <reference types="react" />
3
3
  /// <reference types="react-dom" />
4
4
  /// <reference path="./dist/types/index.d.ts" />
5
- /// <reference types="@modern-js/plugin-express/types" />
6
- /// <reference types="@modern-js/plugin-koa/types" />
7
- /// <reference types="@modern-js/plugin-egg" />
8
- /// <reference types="@modern-js/plugin-nest" />
9
5
 
10
6
  declare namespace NodeJS {
11
7
  interface ProcessEnv {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modern-js/app-tools",
3
- "version": "1.0.0-rc.10",
3
+ "version": "1.0.0-rc.14",
4
4
  "jsnext:source": "./src/index.ts",
5
5
  "types": "./lib/types.d.ts",
6
6
  "main": "./dist/js/node/index.js",
@@ -21,18 +21,18 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@babel/runtime": "^7",
24
- "@modern-js/core": "^1.0.0-rc.10",
25
- "@modern-js/types": "^1.0.0-rc.10",
26
- "@modern-js/i18n-cli-language-detector": "^1.0.0-rc.10",
27
- "@modern-js/new-action": "^1.0.0-rc.10",
28
- "@modern-js/plugin": "^1.0.0-rc.10",
29
- "@modern-js/plugin-analyze": "^1.0.0-rc.10",
30
- "@modern-js/plugin-fast-refresh": "^1.0.0-rc.10",
31
- "@modern-js/plugin-i18n": "^1.0.0-rc.10",
32
- "@modern-js/plugin-polyfill": "^1.0.0-rc.10",
33
- "@modern-js/server": "^1.0.0-rc.10",
34
- "@modern-js/utils": "^1.0.0-rc.10",
35
- "@modern-js/webpack": "^1.0.0-rc.10",
24
+ "@modern-js/core": "^1.0.0-rc.14",
25
+ "@modern-js/types": "^1.0.0-rc.14",
26
+ "@modern-js/i18n-cli-language-detector": "^1.0.0-rc.14",
27
+ "@modern-js/new-action": "^1.0.0-rc.14",
28
+ "@modern-js/plugin": "^1.0.0-rc.14",
29
+ "@modern-js/plugin-analyze": "^1.0.0-rc.14",
30
+ "@modern-js/plugin-fast-refresh": "^1.0.0-rc.14",
31
+ "@modern-js/plugin-i18n": "^1.0.0-rc.14",
32
+ "@modern-js/plugin-polyfill": "^1.0.0-rc.14",
33
+ "@modern-js/server": "^1.0.0-rc.14",
34
+ "@modern-js/utils": "^1.0.0-rc.14",
35
+ "@modern-js/webpack": "^1.0.0-rc.14",
36
36
  "webpack": "^5.54.0"
37
37
  },
38
38
  "devDependencies": {
@@ -41,8 +41,8 @@
41
41
  "@types/react": "^17",
42
42
  "@types/react-dom": "^17",
43
43
  "typescript": "^4",
44
- "@modern-js/plugin-testing": "^1.0.0-rc.10",
45
- "@modern-js/module-tools": "^1.0.0-rc.10"
44
+ "@modern-js/plugin-testing": "^1.0.0-rc.14",
45
+ "@modern-js/module-tools": "^1.0.0-rc.14"
46
46
  },
47
47
  "sideEffects": false,
48
48
  "modernConfig": {
@@ -57,6 +57,7 @@ export const dev = async () => {
57
57
  hot: true,
58
58
  liveReload: true,
59
59
  port,
60
+ https: userConfig.dev.https,
60
61
  },
61
62
  ...userConfig.tools.devServer,
62
63
  },
@@ -25,6 +25,6 @@ export const start = async () => {
25
25
  if (err) {
26
26
  throw err;
27
27
  }
28
- await printInstructions(appContext);
28
+ await printInstructions(appContext, userConfig);
29
29
  });
30
30
  };
@@ -14,7 +14,7 @@ const prettyTime = (stats: StatsCompilation) =>
14
14
  export const createCompiler = async ({
15
15
  webpackConfigs,
16
16
  // TODO: params
17
- userConfig: _userConfig,
17
+ userConfig,
18
18
  appContext,
19
19
  }: {
20
20
  webpackConfigs: Configuration[];
@@ -63,7 +63,7 @@ export const createCompiler = async ({
63
63
  ),
64
64
  );
65
65
  }
66
- await printInstructions(appContext);
66
+ await printInstructions(appContext, userConfig);
67
67
  }
68
68
  // eslint-disable-next-line require-atomic-updates
69
69
  isFirstCompile = false;
@@ -1,8 +1,11 @@
1
1
  import { prettyInstructions, logger, isDev, chalk } from '@modern-js/utils';
2
- import { mountHook, IAppContext } from '@modern-js/core';
2
+ import { mountHook, IAppContext, NormalizedConfig } from '@modern-js/core';
3
3
 
4
- export const printInstructions = async (appContext: IAppContext) => {
5
- let message = prettyInstructions(appContext);
4
+ export const printInstructions = async (
5
+ appContext: IAppContext,
6
+ config: NormalizedConfig,
7
+ ) => {
8
+ let message = prettyInstructions(appContext, config);
6
9
 
7
10
  if (isDev()) {
8
11
  message += `\n${chalk.cyanBright(