swico 1.2.0-beta.3 → 1.2.0-beta.5

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