swico 1.2.0 → 1.2.1-beta.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swico",
3
- "version": "1.2.0",
3
+ "version": "1.2.1-beta.1",
4
4
  "description": "Simple, efficient, and practical front-end framework",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -87,36 +87,6 @@ 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
- ];
96
- var tsTypingsWatcher = chokidar_1.default
97
- .watch([path_1.default.join(projectPath, '/src/**/*')], {
98
- interval: 500,
99
- binaryInterval: 500,
100
- ignoreInitial: true
101
- })
102
- .on('all', function (eventName, path, stats) { return __awaiter(void 0, void 0, void 0, function () {
103
- return __generator(this, function (_a) {
104
- switch (_a.label) {
105
- case 0:
106
- if (!((watchFiles.includes(path) || path.endsWith('.d.ts')) &&
107
- ['add', 'unlink'].includes(eventName))) return [3, 3];
108
- return [4, devServer.stop()];
109
- case 1:
110
- _a.sent();
111
- return [4, tsTypingsWatcher.close()];
112
- case 2:
113
- _a.sent();
114
- restartServer();
115
- _a.label = 3;
116
- case 3: return [2];
117
- }
118
- });
119
- }); });
120
90
  };
121
91
  var restartServer = function () {
122
92
  var result = cross_spawn_1.default.sync('cross-env', [
@@ -125,7 +125,14 @@ function default_1(options) {
125
125
  static: {
126
126
  directory: path_1.default.join(projectPath, '/public')
127
127
  },
128
- server: customConfig.dev.https === true ? 'https' : 'http'
128
+ server: customConfig.dev.https === true ? 'https' : 'http',
129
+ watchFiles: [
130
+ path_1.default.join(projectPath, '/src/**/*.d.ts'),
131
+ path_1.default.join(projectPath, '/src/loading/index.tsx'),
132
+ path_1.default.join(projectPath, '/src/global.css'),
133
+ path_1.default.join(projectPath, '/src/global.less'),
134
+ path_1.default.join(projectPath, '/src/global.scss')
135
+ ]
129
136
  },
130
137
  plugins: __spreadArray([
131
138
  new fork_ts_checker_webpack_plugin_1.default({