@modern-js/module-tools 1.3.0 → 1.3.1
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 +23 -0
- package/package.json +15 -15
- package/src/.eslintrc.json +0 -5
- package/src/cli/build.ts +0 -39
- package/src/cli/dev.ts +0 -24
- package/src/cli/index.ts +0 -3
- package/src/cli/new.ts +0 -32
- package/src/commands/build.ts +0 -74
- package/src/commands/dev.ts +0 -52
- package/src/commands/index.ts +0 -2
- package/src/features/build/build-platform.ts +0 -83
- package/src/features/build/build-watch.ts +0 -99
- package/src/features/build/build.ts +0 -111
- package/src/features/build/constants.ts +0 -52
- package/src/features/build/index.ts +0 -54
- package/src/features/build/logger/index.ts +0 -2
- package/src/features/build/logger/logText.ts +0 -80
- package/src/features/build/logger/loggerManager.ts +0 -132
- package/src/features/build/utils.ts +0 -235
- package/src/features/dev/index.ts +0 -74
- package/src/index.ts +0 -55
- package/src/locale/en.ts +0 -21
- package/src/locale/index.ts +0 -15
- package/src/locale/zh.ts +0 -21
- package/src/schema/index.ts +0 -4
- package/src/schema/output.ts +0 -41
- package/src/schema/schema.d.ts +0 -13
- package/src/schema/source.ts +0 -16
- package/src/tasks/build-source-code.ts +0 -234
- package/src/tasks/build-style.ts +0 -194
- package/src/tasks/build-watch-source-code.ts +0 -186
- package/src/tasks/build-watch-style.ts +0 -271
- package/src/tasks/constants.ts +0 -1
- package/src/tasks/copy-assets.ts +0 -123
- package/src/tasks/generator-dts.ts +0 -277
- package/src/type.d.ts +0 -1
- package/src/types.ts +0 -65
- package/src/utils/babel.ts +0 -104
- package/src/utils/color.ts +0 -3
- package/src/utils/copy.ts +0 -71
- package/src/utils/init-env.ts +0 -31
- package/src/utils/json.ts +0 -13
- package/src/utils/language.ts +0 -9
- package/src/utils/logger.ts +0 -141
- package/src/utils/readline.ts +0 -28
- package/src/utils/tsconfig.ts +0 -37
- package/src/utils/tspaths-transform/constants.ts +0 -19
- package/src/utils/tspaths-transform/index.ts +0 -139
- package/src/utils/tspaths-transform/utils.ts +0 -25
- package/src/utils/valide.ts +0 -37
package/src/utils/valide.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { validAlias } from '@modern-js/utils';
|
|
2
|
-
import type { NormalizedConfig } from '@modern-js/core';
|
|
3
|
-
|
|
4
|
-
export interface IValideOption {
|
|
5
|
-
modernConfig: NormalizedConfig;
|
|
6
|
-
tsconfigPath: string;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export const valideBeforeTask = ({
|
|
10
|
-
modernConfig,
|
|
11
|
-
tsconfigPath,
|
|
12
|
-
}: IValideOption) => {
|
|
13
|
-
const modernConfigValidResult = modernConfigValid(modernConfig, {
|
|
14
|
-
tsconfigPath,
|
|
15
|
-
});
|
|
16
|
-
if (modernConfigValidResult) {
|
|
17
|
-
console.error(modernConfigValidResult);
|
|
18
|
-
// eslint-disable-next-line no-process-exit
|
|
19
|
-
process.exit(0);
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export const modernConfigValid = (
|
|
24
|
-
modernConfig: NormalizedConfig,
|
|
25
|
-
option: { tsconfigPath: string },
|
|
26
|
-
) => {
|
|
27
|
-
const valids = [validAlias];
|
|
28
|
-
|
|
29
|
-
for (const validFn of valids) {
|
|
30
|
-
const result = validFn(modernConfig, option);
|
|
31
|
-
if (result) {
|
|
32
|
-
return result;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return null;
|
|
37
|
-
};
|