xhs-mp-pack 2.0.20 → 2.0.21

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 (2) hide show
  1. package/dist/MPPack.js +33 -59
  2. package/package.json +4 -4
package/dist/MPPack.js CHANGED
@@ -24,72 +24,46 @@ const types_1 = require("./types");
24
24
  const normalization_1 = require("./base/normalization");
25
25
  const setupWriteToDisk_1 = __importDefault(require("./setupWriteToDisk"));
26
26
  exports.watchIgnored = [
27
- '**/node_modules',
28
- 'project.config.json',
29
- 'project.private.config.json',
30
- '**/.git',
27
+ '**/node_modules/**',
28
+ '**/.git/**',
29
+ // 精确匹配根目录下的特定文件
30
+ '/project.config.json',
31
+ '/project.private.config.json',
32
+ // 通用配置类文件
31
33
  '**/.DS_Store',
32
34
  '**/Thumbs.db',
33
- '**/.vscode',
34
- '**/.idea',
35
- '**/.vs',
36
- '**/.xhs-ide',
37
- '.gitignore',
38
- '.npmignore',
39
- '.npmrc',
40
- '.eslintrc.js',
41
- '.eslintrc.json',
42
- '.eslintrc.yaml',
43
- '.eslintrc.yml',
44
- '.eslintrc',
45
- '.prettierignore',
46
- '.prettierrc.js',
47
- '.prettierrc.json',
48
- '.prettierrc.yaml',
49
- '.prettierrc.yml',
50
- '.prettierrc',
51
- '.stylelintrc.js',
52
- '.stylelintrc.json',
53
- '.stylelintrc.yaml',
54
- '.stylelintrc.yml',
55
- '.stylelintrc',
56
- '.babelrc.js',
57
- '.babelrc.json',
58
- '.babelrc.yaml',
59
- '.babelrc.yml',
60
- '.babelrc',
61
- '.browserslistrc',
62
- '.editorconfig',
63
- '.env',
64
- '.env.local',
65
- '.env.development',
66
- '.env.development.local',
67
- '.env.test',
68
- '.env.test.local',
69
- '.env.production',
70
- '.env.production.local',
71
- '.env.staging',
72
- '.env.staging.local',
73
- '.env.pre',
74
- '.env.pre.local',
75
- '.env.prod',
76
- '.env.prod.local',
77
- '.env.stg',
78
- '.gitlab-ci.yml',
79
- 'package.json',
80
- 'package-lock.json',
81
- 'gulpfile.js',
82
- 'yarn.lock',
83
- '**/readme.md',
84
- '**/README*.md',
85
- 'jest.config.js',
86
- ''
35
+ // IDE 相关
36
+ '**/.vscode/**',
37
+ '**/.idea/**',
38
+ '**/.vs/**',
39
+ '**/.xhs-ide/**',
40
+ // 版本控制 & 包管理
41
+ '/.gitignore',
42
+ '**/.npmignore',
43
+ '**/.npmrc',
44
+ // 配置文件(使用更简洁的 glob 模式)
45
+ '**/*rc.js',
46
+ '**/*rc.json',
47
+ '**/*rc.yaml',
48
+ '**/*rc.yml',
49
+ '**/*rc',
50
+ // 环境文件
51
+ '/.env*',
52
+ // 项目元文件
53
+ '/package*.json',
54
+ '/yarn.lock',
55
+ '/gulpfile.js',
56
+ '/jest.config.js',
57
+ // 文档文件(不区分大小写)
58
+ '**/readme*.md',
59
+ '**/README*.md'
87
60
  ];
88
61
  const watchOptions = {
89
62
  aggregateTimeout: 300,
90
63
  poll: false,
91
64
  ignored: exports.watchIgnored
92
65
  };
66
+ console.log(1111, 'watchOptions', watchOptions);
93
67
  const { BUILD_REASON } = const_1.default;
94
68
  class AbstractMPPack extends events_1.EventEmitter {
95
69
  }
@@ -157,7 +131,7 @@ class MPPack extends AbstractMPPack {
157
131
  info
158
132
  });
159
133
  };
160
- this.handleBuildInfo = (info) => {
134
+ this.handleBuildInfo = info => {
161
135
  this.emit('buildInfo', info);
162
136
  };
163
137
  const { projectPath, project, platform } = options;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xhs-mp-pack",
3
- "version": "2.0.20",
3
+ "version": "2.0.21",
4
4
  "description": "xhs mp compiler core.",
5
5
  "preferGlobal": true,
6
6
  "category": "esm",
@@ -55,9 +55,9 @@
55
55
  "watchpack": "^2.4.0",
56
56
  "webpack-chain": "^6.5.1",
57
57
  "webpack-sources": "^3.2.3",
58
- "xhs-mp-compiler-utils": "2.0.20",
59
- "xhs-mp-project": "2.0.20",
60
- "xhs-mp-shared-fs": "2.0.20"
58
+ "xhs-mp-compiler-utils": "2.0.21",
59
+ "xhs-mp-project": "2.0.21",
60
+ "xhs-mp-shared-fs": "2.0.21"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@types/babel__generator": "7.6.3",