@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.
Files changed (50) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/package.json +15 -15
  3. package/src/.eslintrc.json +0 -5
  4. package/src/cli/build.ts +0 -39
  5. package/src/cli/dev.ts +0 -24
  6. package/src/cli/index.ts +0 -3
  7. package/src/cli/new.ts +0 -32
  8. package/src/commands/build.ts +0 -74
  9. package/src/commands/dev.ts +0 -52
  10. package/src/commands/index.ts +0 -2
  11. package/src/features/build/build-platform.ts +0 -83
  12. package/src/features/build/build-watch.ts +0 -99
  13. package/src/features/build/build.ts +0 -111
  14. package/src/features/build/constants.ts +0 -52
  15. package/src/features/build/index.ts +0 -54
  16. package/src/features/build/logger/index.ts +0 -2
  17. package/src/features/build/logger/logText.ts +0 -80
  18. package/src/features/build/logger/loggerManager.ts +0 -132
  19. package/src/features/build/utils.ts +0 -235
  20. package/src/features/dev/index.ts +0 -74
  21. package/src/index.ts +0 -55
  22. package/src/locale/en.ts +0 -21
  23. package/src/locale/index.ts +0 -15
  24. package/src/locale/zh.ts +0 -21
  25. package/src/schema/index.ts +0 -4
  26. package/src/schema/output.ts +0 -41
  27. package/src/schema/schema.d.ts +0 -13
  28. package/src/schema/source.ts +0 -16
  29. package/src/tasks/build-source-code.ts +0 -234
  30. package/src/tasks/build-style.ts +0 -194
  31. package/src/tasks/build-watch-source-code.ts +0 -186
  32. package/src/tasks/build-watch-style.ts +0 -271
  33. package/src/tasks/constants.ts +0 -1
  34. package/src/tasks/copy-assets.ts +0 -123
  35. package/src/tasks/generator-dts.ts +0 -277
  36. package/src/type.d.ts +0 -1
  37. package/src/types.ts +0 -65
  38. package/src/utils/babel.ts +0 -104
  39. package/src/utils/color.ts +0 -3
  40. package/src/utils/copy.ts +0 -71
  41. package/src/utils/init-env.ts +0 -31
  42. package/src/utils/json.ts +0 -13
  43. package/src/utils/language.ts +0 -9
  44. package/src/utils/logger.ts +0 -141
  45. package/src/utils/readline.ts +0 -28
  46. package/src/utils/tsconfig.ts +0 -37
  47. package/src/utils/tspaths-transform/constants.ts +0 -19
  48. package/src/utils/tspaths-transform/index.ts +0 -139
  49. package/src/utils/tspaths-transform/utils.ts +0 -25
  50. package/src/utils/valide.ts +0 -37
@@ -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
- };