swico 1.3.0-beta.2 → 1.3.0-beta.3
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 +1 -1
- package/src/command/start.js +8 -2
package/package.json
CHANGED
package/src/command/start.js
CHANGED
|
@@ -106,7 +106,9 @@ var handleWatch = function (projectPath, devServer, env) {
|
|
|
106
106
|
var replaceIndexText, _a;
|
|
107
107
|
return __generator(this, function (_b) {
|
|
108
108
|
switch (_b.label) {
|
|
109
|
-
case 0:
|
|
109
|
+
case 0:
|
|
110
|
+
console.log('eventName', eventName, filePath);
|
|
111
|
+
return [4, fs_extra_1.default.readFile(path_1.default.resolve(projectPath, "./src/.swico".concat(envPath, "index.js")), 'utf8')];
|
|
110
112
|
case 1:
|
|
111
113
|
replaceIndexText = _b.sent();
|
|
112
114
|
if (!['add', 'unlink'].includes(eventName)) return [3, 7];
|
|
@@ -117,7 +119,9 @@ var handleWatch = function (projectPath, devServer, env) {
|
|
|
117
119
|
case filePath === loadingFilePath: return [3, 6];
|
|
118
120
|
}
|
|
119
121
|
return [3, 7];
|
|
120
|
-
case 2:
|
|
122
|
+
case 2:
|
|
123
|
+
console.log('1');
|
|
124
|
+
return [4, devServer.stop()];
|
|
121
125
|
case 3:
|
|
122
126
|
_b.sent();
|
|
123
127
|
return [4, tsTypingsWatcher.close()];
|
|
@@ -126,9 +130,11 @@ var handleWatch = function (projectPath, devServer, env) {
|
|
|
126
130
|
restartServer();
|
|
127
131
|
return [3, 7];
|
|
128
132
|
case 5:
|
|
133
|
+
console.log('2');
|
|
129
134
|
(0, config_1.handleGlobalStyleFile)(replaceIndexText);
|
|
130
135
|
return [3, 7];
|
|
131
136
|
case 6:
|
|
137
|
+
console.log('3');
|
|
132
138
|
(0, config_1.handleLoadingFile)(replaceIndexText, envPath);
|
|
133
139
|
_b.label = 7;
|
|
134
140
|
case 7: return [2];
|