@modern-js/module-tools 1.5.3 → 1.5.6
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 +51 -0
- package/dist/js/modern/commands/build.js +4 -2
- package/dist/js/modern/features/build/build.js +34 -17
- package/dist/js/node/commands/build.js +4 -2
- package/dist/js/node/features/build/build.js +34 -17
- package/dist/types/commands/build.d.ts +2 -1
- package/dist/types/types.d.ts +1 -0
- package/package.json +17 -20
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,56 @@
|
|
|
1
1
|
# @modern-js/module-tools
|
|
2
2
|
|
|
3
|
+
## 1.5.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a1198d509: feat: bump babel 7.18.0
|
|
8
|
+
- Updated dependencies [8d508c6ed]
|
|
9
|
+
- Updated dependencies [0eff2473c]
|
|
10
|
+
- Updated dependencies [a1198d509]
|
|
11
|
+
- Updated dependencies [f25d6a62e]
|
|
12
|
+
- Updated dependencies [a18926bbd]
|
|
13
|
+
- Updated dependencies [c7e38b4e6]
|
|
14
|
+
- Updated dependencies [8f7c0f898]
|
|
15
|
+
- @modern-js/core@1.11.2
|
|
16
|
+
- @modern-js/babel-preset-module@1.3.7
|
|
17
|
+
- @modern-js/i18n-cli-language-detector@1.2.4
|
|
18
|
+
- @modern-js/plugin-analyze@1.4.6
|
|
19
|
+
- @modern-js/plugin-changeset@1.2.8
|
|
20
|
+
- @modern-js/plugin-i18n@1.2.7
|
|
21
|
+
- @modern-js/new-action@1.3.10
|
|
22
|
+
- @modern-js/babel-compiler@1.2.6
|
|
23
|
+
- @modern-js/style-compiler@1.2.9
|
|
24
|
+
- @modern-js/plugin@1.3.6
|
|
25
|
+
- @modern-js/css-config@1.2.6
|
|
26
|
+
|
|
27
|
+
## 1.5.5
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- d6e1e8917: support --style-only param
|
|
32
|
+
|
|
33
|
+
## 1.5.4
|
|
34
|
+
|
|
35
|
+
### Patch Changes
|
|
36
|
+
|
|
37
|
+
- da65bf12: chore: merge plugin-fast-refresh into webpack
|
|
38
|
+
- b02a4c35: fix: fix missing peer deps
|
|
39
|
+
- Updated dependencies [f730081c]
|
|
40
|
+
- Updated dependencies [d1ab1f05]
|
|
41
|
+
- Updated dependencies [2ec8181a]
|
|
42
|
+
- Updated dependencies [6451a098]
|
|
43
|
+
- Updated dependencies [b02a4c35]
|
|
44
|
+
- Updated dependencies [7fcfd6cc]
|
|
45
|
+
- Updated dependencies [d5a2cfd8]
|
|
46
|
+
- Updated dependencies [437367c6]
|
|
47
|
+
- @modern-js/core@1.11.1
|
|
48
|
+
- @modern-js/utils@1.7.6
|
|
49
|
+
- @modern-js/babel-preset-module@1.3.6
|
|
50
|
+
- @modern-js/css-config@1.2.6
|
|
51
|
+
- @modern-js/plugin-analyze@1.4.5
|
|
52
|
+
- @modern-js/plugin-changeset@1.2.7
|
|
53
|
+
|
|
3
54
|
## 1.5.3
|
|
4
55
|
|
|
5
56
|
### Patch Changes
|
|
@@ -8,7 +8,8 @@ export const build = async (api, {
|
|
|
8
8
|
tsconfig: tsconfigName,
|
|
9
9
|
tsc,
|
|
10
10
|
clear: _clear = true,
|
|
11
|
-
platform
|
|
11
|
+
platform,
|
|
12
|
+
styleOnly
|
|
12
13
|
}) => {
|
|
13
14
|
const {
|
|
14
15
|
appDirectory
|
|
@@ -31,7 +32,8 @@ export const build = async (api, {
|
|
|
31
32
|
sourceDir: 'src',
|
|
32
33
|
tsconfigName,
|
|
33
34
|
enableTscCompiler,
|
|
34
|
-
clear: _clear
|
|
35
|
+
clear: _clear,
|
|
36
|
+
styleOnly
|
|
35
37
|
}, modernConfig);
|
|
36
38
|
process.on('SIGBREAK', () => {
|
|
37
39
|
console.info('exit');
|
|
@@ -8,7 +8,8 @@ const constants = Import.lazy('./constants', require);
|
|
|
8
8
|
export const buildSourceCode = async (api, config, _) => {
|
|
9
9
|
const {
|
|
10
10
|
sourceDir,
|
|
11
|
-
enableTscCompiler
|
|
11
|
+
enableTscCompiler,
|
|
12
|
+
styleOnly
|
|
12
13
|
} = config;
|
|
13
14
|
const {
|
|
14
15
|
appDirectory
|
|
@@ -29,20 +30,33 @@ export const buildSourceCode = async (api, config, _) => {
|
|
|
29
30
|
title: 'Copy Log:'
|
|
30
31
|
});
|
|
31
32
|
const initCodeMapper = utils.getCodeInitMapper(api, config);
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
33
|
+
let taskMapper = [];
|
|
34
|
+
|
|
35
|
+
if (styleOnly) {
|
|
36
|
+
taskMapper = [{
|
|
37
|
+
logger: styleLog,
|
|
38
|
+
taskPath: require.resolve("../../tasks/build-style")
|
|
39
|
+
}, {
|
|
40
|
+
logger: copyLog,
|
|
41
|
+
taskPath: require.resolve("../../tasks/copy-assets")
|
|
42
|
+
}];
|
|
43
|
+
} else {
|
|
44
|
+
taskMapper = [...utils.getCodeMapper(api, {
|
|
45
|
+
logger: codeLog,
|
|
46
|
+
taskPath: require.resolve("../../tasks/build-source-code"),
|
|
47
|
+
config,
|
|
48
|
+
willCompilerDirOrFile: sourceDir,
|
|
49
|
+
initMapper: initCodeMapper,
|
|
50
|
+
srcRootDir
|
|
51
|
+
}), ...(enableTscCompiler ? utils.getDtsMapper(api, config, dtsLog) : []), {
|
|
52
|
+
logger: styleLog,
|
|
53
|
+
taskPath: require.resolve("../../tasks/build-style")
|
|
54
|
+
}, {
|
|
55
|
+
logger: copyLog,
|
|
56
|
+
taskPath: require.resolve("../../tasks/copy-assets")
|
|
57
|
+
}];
|
|
58
|
+
}
|
|
59
|
+
|
|
46
60
|
lm.showCompiling();
|
|
47
61
|
await pMap(taskMapper, async ({
|
|
48
62
|
logger,
|
|
@@ -88,8 +102,11 @@ export const buildSourceCode = async (api, config, _) => {
|
|
|
88
102
|
concurrency
|
|
89
103
|
});
|
|
90
104
|
lm.disappearCompiling();
|
|
91
|
-
|
|
92
|
-
|
|
105
|
+
|
|
106
|
+
if (!styleOnly) {
|
|
107
|
+
enableTscCompiler && console.info(dtsLog.value);
|
|
108
|
+
console.info(codeLog.value);
|
|
109
|
+
}
|
|
93
110
|
|
|
94
111
|
if (styleLog.hasMessages()) {
|
|
95
112
|
console.info(styleLog.value);
|
|
@@ -24,7 +24,8 @@ const build = async (api, {
|
|
|
24
24
|
tsconfig: tsconfigName,
|
|
25
25
|
tsc,
|
|
26
26
|
clear: _clear = true,
|
|
27
|
-
platform
|
|
27
|
+
platform,
|
|
28
|
+
styleOnly
|
|
28
29
|
}) => {
|
|
29
30
|
const {
|
|
30
31
|
appDirectory
|
|
@@ -49,7 +50,8 @@ const build = async (api, {
|
|
|
49
50
|
sourceDir: 'src',
|
|
50
51
|
tsconfigName,
|
|
51
52
|
enableTscCompiler,
|
|
52
|
-
clear: _clear
|
|
53
|
+
clear: _clear,
|
|
54
|
+
styleOnly
|
|
53
55
|
}, modernConfig);
|
|
54
56
|
process.on('SIGBREAK', () => {
|
|
55
57
|
console.info('exit');
|
|
@@ -26,7 +26,8 @@ const constants = _utils.Import.lazy('./constants', require);
|
|
|
26
26
|
const buildSourceCode = async (api, config, _) => {
|
|
27
27
|
const {
|
|
28
28
|
sourceDir,
|
|
29
|
-
enableTscCompiler
|
|
29
|
+
enableTscCompiler,
|
|
30
|
+
styleOnly
|
|
30
31
|
} = config;
|
|
31
32
|
const {
|
|
32
33
|
appDirectory
|
|
@@ -47,20 +48,33 @@ const buildSourceCode = async (api, config, _) => {
|
|
|
47
48
|
title: 'Copy Log:'
|
|
48
49
|
});
|
|
49
50
|
const initCodeMapper = utils.getCodeInitMapper(api, config);
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
51
|
+
let taskMapper = [];
|
|
52
|
+
|
|
53
|
+
if (styleOnly) {
|
|
54
|
+
taskMapper = [{
|
|
55
|
+
logger: styleLog,
|
|
56
|
+
taskPath: require.resolve("../../tasks/build-style")
|
|
57
|
+
}, {
|
|
58
|
+
logger: copyLog,
|
|
59
|
+
taskPath: require.resolve("../../tasks/copy-assets")
|
|
60
|
+
}];
|
|
61
|
+
} else {
|
|
62
|
+
taskMapper = [...utils.getCodeMapper(api, {
|
|
63
|
+
logger: codeLog,
|
|
64
|
+
taskPath: require.resolve("../../tasks/build-source-code"),
|
|
65
|
+
config,
|
|
66
|
+
willCompilerDirOrFile: sourceDir,
|
|
67
|
+
initMapper: initCodeMapper,
|
|
68
|
+
srcRootDir
|
|
69
|
+
}), ...(enableTscCompiler ? utils.getDtsMapper(api, config, dtsLog) : []), {
|
|
70
|
+
logger: styleLog,
|
|
71
|
+
taskPath: require.resolve("../../tasks/build-style")
|
|
72
|
+
}, {
|
|
73
|
+
logger: copyLog,
|
|
74
|
+
taskPath: require.resolve("../../tasks/copy-assets")
|
|
75
|
+
}];
|
|
76
|
+
}
|
|
77
|
+
|
|
64
78
|
lm.showCompiling();
|
|
65
79
|
await pMap(taskMapper, async ({
|
|
66
80
|
logger,
|
|
@@ -106,8 +120,11 @@ const buildSourceCode = async (api, config, _) => {
|
|
|
106
120
|
concurrency
|
|
107
121
|
});
|
|
108
122
|
lm.disappearCompiling();
|
|
109
|
-
|
|
110
|
-
|
|
123
|
+
|
|
124
|
+
if (!styleOnly) {
|
|
125
|
+
enableTscCompiler && console.info(dtsLog.value);
|
|
126
|
+
console.info(codeLog.value);
|
|
127
|
+
}
|
|
111
128
|
|
|
112
129
|
if (styleLog.hasMessages()) {
|
|
113
130
|
console.info(styleLog.value);
|
package/dist/types/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.5.
|
|
14
|
+
"version": "1.5.6",
|
|
15
15
|
"bin": {
|
|
16
16
|
"modern": "./bin/modern.js"
|
|
17
17
|
},
|
|
@@ -49,31 +49,28 @@
|
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@babel/generator": "^7.
|
|
53
|
-
"@babel/parser": "^7.
|
|
54
|
-
"@babel/runtime": "^7",
|
|
55
|
-
"@babel/traverse": "^7.
|
|
56
|
-
"@babel/types": "^7.
|
|
57
|
-
"@modern-js/babel-compiler": "^1.2.
|
|
58
|
-
"@modern-js/babel-preset-module": "^1.3.
|
|
59
|
-
"@modern-js/core": "^1.
|
|
52
|
+
"@babel/generator": "^7.18.0",
|
|
53
|
+
"@babel/parser": "^7.18.0",
|
|
54
|
+
"@babel/runtime": "^7.18.0",
|
|
55
|
+
"@babel/traverse": "^7.18.0",
|
|
56
|
+
"@babel/types": "^7.18.0",
|
|
57
|
+
"@modern-js/babel-compiler": "^1.2.6",
|
|
58
|
+
"@modern-js/babel-preset-module": "^1.3.7",
|
|
59
|
+
"@modern-js/core": "^1.11.2",
|
|
60
60
|
"@modern-js/css-config": "^1.2.6",
|
|
61
|
-
"@modern-js/i18n-cli-language-detector": "^1.2.
|
|
62
|
-
"@modern-js/new-action": "^1.3.
|
|
63
|
-
"@modern-js/plugin": "^1.3.
|
|
64
|
-
"@modern-js/plugin-analyze": "^1.4.
|
|
65
|
-
"@modern-js/plugin-changeset": "^1.2.
|
|
66
|
-
"@modern-js/plugin-
|
|
67
|
-
"@modern-js/
|
|
68
|
-
"@modern-js/
|
|
69
|
-
"@modern-js/utils": "^1.7.4",
|
|
61
|
+
"@modern-js/i18n-cli-language-detector": "^1.2.4",
|
|
62
|
+
"@modern-js/new-action": "^1.3.10",
|
|
63
|
+
"@modern-js/plugin": "^1.3.6",
|
|
64
|
+
"@modern-js/plugin-analyze": "^1.4.6",
|
|
65
|
+
"@modern-js/plugin-changeset": "^1.2.8",
|
|
66
|
+
"@modern-js/plugin-i18n": "^1.2.7",
|
|
67
|
+
"@modern-js/style-compiler": "^1.2.9",
|
|
68
|
+
"@modern-js/utils": "^1.7.6",
|
|
70
69
|
"normalize-path": "^3.0.0",
|
|
71
70
|
"p-map": "^4",
|
|
72
71
|
"process.argv": "^0.6.0"
|
|
73
72
|
},
|
|
74
73
|
"devDependencies": {
|
|
75
|
-
"@babel/preset-typescript": "^7.15.0",
|
|
76
|
-
"@modern-js/babel-chain": "1.2.3",
|
|
77
74
|
"@scripts/build": "0.0.0",
|
|
78
75
|
"@scripts/jest-config": "0.0.0",
|
|
79
76
|
"@types/babel__core": "^7.1.15",
|