swico 1.2.0-beta.2 → 1.2.0-beta.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swico",
3
- "version": "1.2.0-beta.2",
3
+ "version": "1.2.0-beta.4",
4
4
  "description": "Simple, efficient, and practical front-end framework",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -87,14 +87,14 @@ var handleWatch = function (projectPath, devServer) {
87
87
  }
88
88
  });
89
89
  }); });
90
- var tsTypingsWatcher = chokidar_1.default
91
- .watch([
92
- path_1.default.join(projectPath, '/src/**/*.d.ts'),
90
+ var watchFiles = [
93
91
  path_1.default.join(projectPath, '/src/loading/index.tsx'),
94
92
  path_1.default.join(projectPath, '/src/global.css'),
95
93
  path_1.default.join(projectPath, '/src/global.less'),
96
94
  path_1.default.join(projectPath, '/src/global.scss')
97
- ], {
95
+ ];
96
+ var tsTypingsWatcher = chokidar_1.default
97
+ .watch([path_1.default.join(projectPath, '/src/**/*')], {
98
98
  interval: 500,
99
99
  binaryInterval: 500,
100
100
  ignoreInitial: true
@@ -104,7 +104,8 @@ var handleWatch = function (projectPath, devServer) {
104
104
  switch (_a.label) {
105
105
  case 0:
106
106
  console.log('eventName', eventName, path);
107
- if (!['add', 'unlink'].includes(eventName)) return [3, 3];
107
+ if (!((watchFiles.includes(path) || path.endsWith('.d.ts')) &&
108
+ ['add', 'unlink'].includes(eventName))) return [3, 3];
108
109
  return [4, devServer.stop()];
109
110
  case 1:
110
111
  _a.sent();