@modern-js/plugin-docsite 0.0.0-canary-20220127122200 → 0.0.0-canary-20220209053631

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,15 +1,28 @@
1
1
  # @modern-js/plugin-docsite
2
2
 
3
- ## 0.0.0-canary-20220127122200
3
+ ## 0.0.0-canary-20220209053631
4
+
5
+ ### Patch Changes
6
+
7
+ - 24f616ca: feat: support custom meta info
8
+ - Updated dependencies [ec4dbffb]
9
+ - Updated dependencies [bada2879]
10
+ - Updated dependencies [24f616ca]
11
+ - @modern-js/webpack@0.0.0-canary-20220209053631
12
+ - @modern-js/utils@0.0.0-canary-20220209053631
13
+ - @modern-js/core@0.0.0-canary-20220209053631
14
+
15
+ ## 1.2.1
4
16
 
5
17
  ### Patch Changes
6
18
 
7
19
  - 83166714: change .npmignore
8
20
  - Updated dependencies [83166714]
21
+ - Updated dependencies [c3de9882]
9
22
  - Updated dependencies [33ff48af]
10
- - @modern-js/core@0.0.0-canary-20220127122200
11
- - @modern-js/webpack@0.0.0-canary-20220127122200
12
- - @modern-js/utils@0.0.0-canary-20220127122200
23
+ - @modern-js/core@1.3.2
24
+ - @modern-js/webpack@1.2.1
25
+ - @modern-js/utils@1.2.2
13
26
 
14
27
  ## 1.2.0
15
28
 
@@ -6,10 +6,12 @@ const taskMain = async ({
6
6
  appContext
7
7
  }) => {
8
8
  const {
9
- appDirectory
9
+ appDirectory,
10
+ internalDirectory
10
11
  } = appContext;
11
12
  await features.buildDocs({
12
- appDirectory
13
+ appDirectory,
14
+ internalDirectory
13
15
  });
14
16
  };
15
17
 
@@ -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(appDirectory, './node_modules/.modern-js/docs');
38
+ const tmpDir = path.join(internalDirectory, './docs');
38
39
  fs.ensureDirSync(tmpDir);
39
40
  const finalWebpackConfig = wp.generatorWebpackConfig(appDirectory, tmpDir, isDev);
40
41
 
@@ -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
  };
@@ -10,10 +10,12 @@ const taskMain = async ({
10
10
  appContext
11
11
  }) => {
12
12
  const {
13
- appDirectory
13
+ appDirectory,
14
+ internalDirectory
14
15
  } = appContext;
15
16
  await features.buildDocs({
16
- appDirectory
17
+ appDirectory,
18
+ internalDirectory
17
19
  });
18
20
  };
19
21
 
@@ -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(appDirectory, './node_modules/.modern-js/docs');
56
+ const tmpDir = _path.default.join(internalDirectory, './docs');
56
57
 
57
58
  _utils.fs.ensureDirSync(tmpDir);
58
59
 
@@ -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/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "0.0.0-canary-20220127122200",
14
+ "version": "0.0.0-canary-20220209053631",
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-20220127122200",
41
- "@modern-js/webpack": "^0.0.0-canary-20220127122200",
40
+ "@modern-js/utils": "^0.0.0-canary-20220209053631",
41
+ "@modern-js/webpack": "^0.0.0-canary-20220209053631",
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": "^0.0.0-canary-20220127122200",
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-20220127122200",
76
+ "@modern-js/core": "^0.0.0-canary-20220209053631",
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-20220127122200"
82
+ "@modern-js/core": "^0.0.0-canary-20220209053631"
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>