@modern-js/module-tools 1.7.1 → 1.17.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
CHANGED
|
@@ -1,5 +1,91 @@
|
|
|
1
1
|
# @modern-js/module-tools
|
|
2
2
|
|
|
3
|
+
## 1.17.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 003837c: fix: ignore css when copy in style CompileMode is 'all'
|
|
8
|
+
fix: 当 style 的编译模式为 'all'的时候, 忽略 css 文件的复制
|
|
9
|
+
- fb30bca: feat: add upgrade tools and command
|
|
10
|
+
|
|
11
|
+
feat: 增加升级工具和升级命令
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [1b9176f]
|
|
14
|
+
- Updated dependencies [77d3a38]
|
|
15
|
+
- Updated dependencies [fb30bca]
|
|
16
|
+
- Updated dependencies [f3fab28]
|
|
17
|
+
- Updated dependencies [151329d]
|
|
18
|
+
- Updated dependencies [367405a]
|
|
19
|
+
- Updated dependencies [5af9472]
|
|
20
|
+
- Updated dependencies [6b6a534]
|
|
21
|
+
- Updated dependencies [6b43a2b]
|
|
22
|
+
- Updated dependencies [9f4e5ce]
|
|
23
|
+
- Updated dependencies [58c53a7]
|
|
24
|
+
- Updated dependencies [a7be124]
|
|
25
|
+
- Updated dependencies [31547b4]
|
|
26
|
+
- @modern-js/utils@1.17.0
|
|
27
|
+
- @modern-js/upgrade@1.17.0
|
|
28
|
+
- @modern-js/new-action@1.17.0
|
|
29
|
+
- @modern-js/core@1.17.0
|
|
30
|
+
- @modern-js/babel-preset-module@1.17.0
|
|
31
|
+
- @modern-js/css-config@1.17.0
|
|
32
|
+
- @modern-js/plugin-changeset@1.17.0
|
|
33
|
+
- @modern-js/plugin-i18n@1.17.0
|
|
34
|
+
- @modern-js/plugin-jarvis@1.17.0
|
|
35
|
+
- @modern-js/babel-compiler@1.17.0
|
|
36
|
+
- @modern-js/style-compiler@1.17.0
|
|
37
|
+
- @modern-js/plugin@1.17.0
|
|
38
|
+
|
|
39
|
+
## 1.16.0
|
|
40
|
+
|
|
41
|
+
### Minor Changes
|
|
42
|
+
|
|
43
|
+
- 1100dd58c: chore: support react 18
|
|
44
|
+
|
|
45
|
+
chore: 支持 React 18
|
|
46
|
+
|
|
47
|
+
### Patch Changes
|
|
48
|
+
|
|
49
|
+
- Updated dependencies [641592f52]
|
|
50
|
+
- Updated dependencies [3904b30a5]
|
|
51
|
+
- Updated dependencies [1100dd58c]
|
|
52
|
+
- Updated dependencies [e04e6e76a]
|
|
53
|
+
- Updated dependencies [81c66e4a4]
|
|
54
|
+
- Updated dependencies [2c305b6f5]
|
|
55
|
+
- Updated dependencies [9d9bbfd05]
|
|
56
|
+
- @modern-js/utils@1.16.0
|
|
57
|
+
- @modern-js/css-config@1.16.0
|
|
58
|
+
- @modern-js/style-compiler@1.16.0
|
|
59
|
+
- @modern-js/new-action@1.16.0
|
|
60
|
+
- @modern-js/babel-preset-module@1.16.0
|
|
61
|
+
- @modern-js/core@1.16.0
|
|
62
|
+
- @modern-js/plugin-changeset@1.16.0
|
|
63
|
+
- @modern-js/plugin-i18n@1.16.0
|
|
64
|
+
- @modern-js/plugin-jarvis@1.16.0
|
|
65
|
+
- @modern-js/babel-compiler@1.16.0
|
|
66
|
+
- @modern-js/plugin@1.16.0
|
|
67
|
+
|
|
68
|
+
## 1.15.0
|
|
69
|
+
|
|
70
|
+
### Patch Changes
|
|
71
|
+
|
|
72
|
+
- Updated dependencies [8658a78]
|
|
73
|
+
- Updated dependencies [05d4a4f]
|
|
74
|
+
- Updated dependencies [ad05af9]
|
|
75
|
+
- Updated dependencies [5d53d1c]
|
|
76
|
+
- Updated dependencies [37cd159]
|
|
77
|
+
- @modern-js/utils@1.15.0
|
|
78
|
+
- @modern-js/new-action@1.15.0
|
|
79
|
+
- @modern-js/babel-preset-module@1.15.0
|
|
80
|
+
- @modern-js/core@1.15.0
|
|
81
|
+
- @modern-js/css-config@1.15.0
|
|
82
|
+
- @modern-js/plugin-changeset@1.15.0
|
|
83
|
+
- @modern-js/plugin-i18n@1.15.0
|
|
84
|
+
- @modern-js/plugin-jarvis@1.15.0
|
|
85
|
+
- @modern-js/babel-compiler@1.15.0
|
|
86
|
+
- @modern-js/style-compiler@1.15.0
|
|
87
|
+
- @modern-js/plugin@1.15.0
|
|
88
|
+
|
|
3
89
|
## 1.7.1
|
|
4
90
|
|
|
5
91
|
### Patch Changes
|
|
@@ -90,9 +90,10 @@ const generatorFileAndLog = (result, titleText) => {
|
|
|
90
90
|
|
|
91
91
|
const copyOriginStyleFiles = ({
|
|
92
92
|
targetDir,
|
|
93
|
-
outputDir
|
|
93
|
+
outputDir,
|
|
94
|
+
ignoreCSS: _ignoreCSS = false
|
|
94
95
|
}) => {
|
|
95
|
-
const styleFiles = glob.sync(`${targetDir}/**/*.{css,sass,scss,less}`);
|
|
96
|
+
const styleFiles = glob.sync(`${targetDir}/**/*.{${_ignoreCSS ? '' : 'css,'}sass,scss,less}`);
|
|
96
97
|
|
|
97
98
|
if (styleFiles.length > 0) {
|
|
98
99
|
fs.ensureDirSync(outputDir);
|
|
@@ -237,7 +238,8 @@ export const buildStyle = async (api, config) => {
|
|
|
237
238
|
if (watch) {
|
|
238
239
|
copyOriginStyleFiles({
|
|
239
240
|
targetDir: srcDir,
|
|
240
|
-
outputDir: outputDirToSrc
|
|
241
|
+
outputDir: outputDirToSrc,
|
|
242
|
+
ignoreCSS: style.compileMode === 'all'
|
|
241
243
|
});
|
|
242
244
|
console.info(watchSectionTitle(titleText, SectionTitleStatus.Success));
|
|
243
245
|
watcher(`${srcDir}/**/*.{css,less,sass,scss}`, ({
|
|
@@ -250,7 +252,8 @@ export const buildStyle = async (api, config) => {
|
|
|
250
252
|
} else {
|
|
251
253
|
copyOriginStyleFiles({
|
|
252
254
|
targetDir: srcDir,
|
|
253
|
-
outputDir: outputDirToSrc
|
|
255
|
+
outputDir: outputDirToSrc,
|
|
256
|
+
ignoreCSS: style.compileMode === 'all'
|
|
254
257
|
});
|
|
255
258
|
}
|
|
256
259
|
|
|
@@ -259,7 +262,8 @@ export const buildStyle = async (api, config) => {
|
|
|
259
262
|
} else {
|
|
260
263
|
copyOriginStyleFiles({
|
|
261
264
|
targetDir: srcDir,
|
|
262
|
-
outputDir: outputDirToSrc
|
|
265
|
+
outputDir: outputDirToSrc,
|
|
266
|
+
ignoreCSS: style.compileMode === 'all'
|
|
263
267
|
});
|
|
264
268
|
}
|
|
265
269
|
}
|
package/dist/js/modern/index.js
CHANGED
|
@@ -3,6 +3,7 @@ import ChangesetPlugin from '@modern-js/plugin-changeset';
|
|
|
3
3
|
import LintPlugin from '@modern-js/plugin-jarvis';
|
|
4
4
|
import { hooks } from "./hooks";
|
|
5
5
|
export * from "./types";
|
|
6
|
+
const upgradeModel = Import.lazy('@modern-js/upgrade', require);
|
|
6
7
|
const cli = Import.lazy('./cli', require);
|
|
7
8
|
const local = Import.lazy('./locale', require);
|
|
8
9
|
const schema = Import.lazy('./schema', require);
|
|
@@ -11,7 +12,7 @@ export { defineConfig } from '@modern-js/core';
|
|
|
11
12
|
const isBuildMode = process.argv.slice(2)[0] === 'build';
|
|
12
13
|
export default (() => ({
|
|
13
14
|
name: '@modern-js/module-tools',
|
|
14
|
-
post: ['@modern-js/plugin-
|
|
15
|
+
post: ['@modern-js/plugin-changeset'],
|
|
15
16
|
registerHook: hooks,
|
|
16
17
|
usePlugins: isBuildMode ? [] : [ChangesetPlugin(), LintPlugin()],
|
|
17
18
|
setup: api => {
|
|
@@ -20,7 +21,7 @@ export default (() => ({
|
|
|
20
21
|
locale
|
|
21
22
|
});
|
|
22
23
|
return {
|
|
23
|
-
// copy from @modern-js/
|
|
24
|
+
// copy from @modern-js/app-tools/src/analyze/index.ts
|
|
24
25
|
async prepare() {
|
|
25
26
|
const appContext = api.useAppContext();
|
|
26
27
|
const hookRunners = api.useHookRunners();
|
|
@@ -51,7 +52,8 @@ export default (() => ({
|
|
|
51
52
|
}) {
|
|
52
53
|
cli.devCli(program, api);
|
|
53
54
|
cli.buildCli(program, api);
|
|
54
|
-
cli.newCli(program, locale);
|
|
55
|
+
cli.newCli(program, locale);
|
|
56
|
+
upgradeModel.defineCommand(program.command('upgrade')); // 便于其他插件辨别
|
|
55
57
|
|
|
56
58
|
program.$$libraryName = 'module-tools';
|
|
57
59
|
}
|
|
@@ -111,9 +111,10 @@ const generatorFileAndLog = (result, titleText) => {
|
|
|
111
111
|
|
|
112
112
|
const copyOriginStyleFiles = ({
|
|
113
113
|
targetDir,
|
|
114
|
-
outputDir
|
|
114
|
+
outputDir,
|
|
115
|
+
ignoreCSS: _ignoreCSS = false
|
|
115
116
|
}) => {
|
|
116
|
-
const styleFiles = _utils.glob.sync(`${targetDir}/**/*.{css,sass,scss,less}`);
|
|
117
|
+
const styleFiles = _utils.glob.sync(`${targetDir}/**/*.{${_ignoreCSS ? '' : 'css,'}sass,scss,less}`);
|
|
117
118
|
|
|
118
119
|
if (styleFiles.length > 0) {
|
|
119
120
|
_utils.fs.ensureDirSync(outputDir);
|
|
@@ -267,7 +268,8 @@ const buildStyle = async (api, config) => {
|
|
|
267
268
|
if (watch) {
|
|
268
269
|
copyOriginStyleFiles({
|
|
269
270
|
targetDir: srcDir,
|
|
270
|
-
outputDir: outputDirToSrc
|
|
271
|
+
outputDir: outputDirToSrc,
|
|
272
|
+
ignoreCSS: style.compileMode === 'all'
|
|
271
273
|
});
|
|
272
274
|
console.info((0, _utils2.watchSectionTitle)(titleText, _utils2.SectionTitleStatus.Success));
|
|
273
275
|
(0, _utils.watch)(`${srcDir}/**/*.{css,less,sass,scss}`, ({
|
|
@@ -281,7 +283,8 @@ const buildStyle = async (api, config) => {
|
|
|
281
283
|
} else {
|
|
282
284
|
copyOriginStyleFiles({
|
|
283
285
|
targetDir: srcDir,
|
|
284
|
-
outputDir: outputDirToSrc
|
|
286
|
+
outputDir: outputDirToSrc,
|
|
287
|
+
ignoreCSS: style.compileMode === 'all'
|
|
285
288
|
});
|
|
286
289
|
}
|
|
287
290
|
|
|
@@ -290,7 +293,8 @@ const buildStyle = async (api, config) => {
|
|
|
290
293
|
} else {
|
|
291
294
|
copyOriginStyleFiles({
|
|
292
295
|
targetDir: srcDir,
|
|
293
|
-
outputDir: outputDirToSrc
|
|
296
|
+
outputDir: outputDirToSrc,
|
|
297
|
+
ignoreCSS: style.compileMode === 'all'
|
|
294
298
|
});
|
|
295
299
|
}
|
|
296
300
|
}
|
package/dist/js/node/index.js
CHANGED
|
@@ -40,6 +40,8 @@ var _core = require("@modern-js/core");
|
|
|
40
40
|
|
|
41
41
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
42
42
|
|
|
43
|
+
const upgradeModel = _utils.Import.lazy('@modern-js/upgrade', require);
|
|
44
|
+
|
|
43
45
|
const cli = _utils.Import.lazy('./cli', require);
|
|
44
46
|
|
|
45
47
|
const local = _utils.Import.lazy('./locale', require);
|
|
@@ -52,7 +54,7 @@ const isBuildMode = process.argv.slice(2)[0] === 'build';
|
|
|
52
54
|
|
|
53
55
|
var _default = () => ({
|
|
54
56
|
name: '@modern-js/module-tools',
|
|
55
|
-
post: ['@modern-js/plugin-
|
|
57
|
+
post: ['@modern-js/plugin-changeset'],
|
|
56
58
|
registerHook: _hooks.hooks,
|
|
57
59
|
usePlugins: isBuildMode ? [] : [(0, _pluginChangeset.default)(), (0, _pluginJarvis.default)()],
|
|
58
60
|
setup: api => {
|
|
@@ -61,7 +63,7 @@ var _default = () => ({
|
|
|
61
63
|
locale
|
|
62
64
|
});
|
|
63
65
|
return {
|
|
64
|
-
// copy from @modern-js/
|
|
66
|
+
// copy from @modern-js/app-tools/src/analyze/index.ts
|
|
65
67
|
async prepare() {
|
|
66
68
|
const appContext = api.useAppContext();
|
|
67
69
|
const hookRunners = api.useHookRunners();
|
|
@@ -92,7 +94,8 @@ var _default = () => ({
|
|
|
92
94
|
}) {
|
|
93
95
|
cli.devCli(program, api);
|
|
94
96
|
cli.buildCli(program, api);
|
|
95
|
-
cli.newCli(program, locale);
|
|
97
|
+
cli.newCli(program, locale);
|
|
98
|
+
upgradeModel.defineCommand(program.command('upgrade')); // 便于其他插件辨别
|
|
96
99
|
|
|
97
100
|
program.$$libraryName = 'module-tools';
|
|
98
101
|
}
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.
|
|
14
|
+
"version": "1.17.0",
|
|
15
15
|
"bin": {
|
|
16
16
|
"modern": "./bin/modern.js"
|
|
17
17
|
},
|
|
@@ -54,17 +54,18 @@
|
|
|
54
54
|
"@babel/runtime": "^7.18.0",
|
|
55
55
|
"@babel/traverse": "^7.18.0",
|
|
56
56
|
"@babel/types": "^7.18.0",
|
|
57
|
-
"@modern-js/babel-compiler": "
|
|
58
|
-
"@modern-js/babel-preset-module": "
|
|
59
|
-
"@modern-js/core": "
|
|
60
|
-
"@modern-js/css-config": "
|
|
61
|
-
"@modern-js/new-action": "
|
|
62
|
-
"@modern-js/
|
|
63
|
-
"@modern-js/plugin
|
|
64
|
-
"@modern-js/plugin-
|
|
65
|
-
"@modern-js/plugin-
|
|
66
|
-
"@modern-js/
|
|
67
|
-
"@modern-js/
|
|
57
|
+
"@modern-js/babel-compiler": "1.17.0",
|
|
58
|
+
"@modern-js/babel-preset-module": "1.17.0",
|
|
59
|
+
"@modern-js/core": "1.17.0",
|
|
60
|
+
"@modern-js/css-config": "1.17.0",
|
|
61
|
+
"@modern-js/new-action": "1.17.0",
|
|
62
|
+
"@modern-js/upgrade": "1.17.0",
|
|
63
|
+
"@modern-js/plugin": "1.17.0",
|
|
64
|
+
"@modern-js/plugin-changeset": "1.17.0",
|
|
65
|
+
"@modern-js/plugin-i18n": "1.17.0",
|
|
66
|
+
"@modern-js/plugin-jarvis": "1.17.0",
|
|
67
|
+
"@modern-js/style-compiler": "1.17.0",
|
|
68
|
+
"@modern-js/utils": "1.17.0",
|
|
68
69
|
"@rollup/plugin-json": "~4.1.0",
|
|
69
70
|
"@speedy-js/speedy-types": "0.13.2-alpha.3",
|
|
70
71
|
"@speedy-js/speedy-core": "0.13.2-alpha.3",
|
|
@@ -78,8 +79,8 @@
|
|
|
78
79
|
"signal-exit": "^3.0.7"
|
|
79
80
|
},
|
|
80
81
|
"devDependencies": {
|
|
81
|
-
"@scripts/build": "
|
|
82
|
-
"@scripts/jest-config": "
|
|
82
|
+
"@scripts/build": "1.17.0",
|
|
83
|
+
"@scripts/jest-config": "1.17.0",
|
|
83
84
|
"@speedy-js/speedy-types": "0.13.2-alpha.3",
|
|
84
85
|
"@types/babel__core": "^7.1.15",
|
|
85
86
|
"@types/babel__generator": "^7.6.3",
|
|
@@ -88,8 +89,6 @@
|
|
|
88
89
|
"@types/jest": "^27",
|
|
89
90
|
"@types/node": "^14",
|
|
90
91
|
"@types/normalize-path": "^3.0.0",
|
|
91
|
-
"@types/react": "^17",
|
|
92
|
-
"@types/react-dom": "^17",
|
|
93
92
|
"@types/signal-exit": "^3.0.1",
|
|
94
93
|
"jest": "^27",
|
|
95
94
|
"typescript": "^4",
|