@salla.sa/twilight 2.0.311 → 2.0.312
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/watcher.js +5 -4
package/package.json
CHANGED
package/watcher.js
CHANGED
|
@@ -110,13 +110,14 @@ class WatcherPlugin {
|
|
|
110
110
|
let files = this.isWebpack5
|
|
111
111
|
? Array.from(compiler_.modifiedFiles || [])
|
|
112
112
|
: Object.keys(compiler_.watchFileSystem.watcher.mtimes);
|
|
113
|
-
|
|
113
|
+
let changes = false;
|
|
114
114
|
files.map((file)=>{
|
|
115
|
-
if(file.toLowerCase().endsWith('.twig'))
|
|
115
|
+
if(file.toLowerCase().endsWith('.twig')){
|
|
116
116
|
execSync(`${this.sallaCli} theme sync -f "${file}" -id ${this.theme_id} -store_id ${this.store_id} -draft_id ${this.draft_id} -upload_url ${this.upload_url}`, {stdio: 'inherit'});
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
changes = true;
|
|
118
|
+
}
|
|
119
119
|
});
|
|
120
|
+
if(changes) this.connection.sendUTF(JSON.stringify({msg:"reload"}));
|
|
120
121
|
}
|
|
121
122
|
);
|
|
122
123
|
}
|