@salla.sa/twilight 2.6.12 → 2.6.14

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": "@salla.sa/twilight",
3
- "version": "2.6.12",
3
+ "version": "2.6.14",
4
4
  "description": "Salla Theme Toolkit, Webcomponents, Events, Requests, Utils",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
package/watcher.js CHANGED
@@ -105,14 +105,13 @@ class WatcherPlugin {
105
105
  let files = this.isWebpack5
106
106
  ? Array.from(compiler_.modifiedFiles || [])
107
107
  : Object.keys(compiler_.watchFileSystem.watcher.mtimes);
108
- let changes = false;
108
+
109
109
  files.map((file)=>{
110
- if(file.toLowerCase().endsWith('.twig')){
110
+ if(file.toLowerCase().endsWith('.twig'))
111
111
  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'});
112
- changes = true;
113
- }
114
112
  });
115
- if(changes && this.connection ) this.connection.sendUTF(JSON.stringify({msg:"reload"}));
113
+
114
+ if(this.connection ) this.connection.sendUTF(JSON.stringify({msg:"reload"}));
116
115
  }
117
116
  );
118
117
  }