@pure-ds/core 0.5.14 → 0.5.16

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@pure-ds/core",
3
3
  "shortname": "pds",
4
- "version": "0.5.14",
4
+ "version": "0.5.16",
5
5
  "description": "Pure Design System - Why develop a Design System when you can generate one?",
6
6
  "repository": {
7
7
  "type": "git",
@@ -335,8 +335,11 @@ settingsBtn.addEventListener('click', () => {
335
335
  }
336
336
 
337
337
  function buildPdsConfig() {
338
- return `let defaultEnhancers = [];
339
- if (typeof window !== "undefined") defaultEnhancers = PDS.defaultEnhancers;
338
+ return `import { PDS } from '@pure-ds/core';
339
+
340
+ const defaultEnhancers = Array.isArray(PDS.defaultEnhancers)
341
+ ? PDS.defaultEnhancers
342
+ : [];
340
343
 
341
344
  export const config = {
342
345
  mode: "static",
@@ -398,7 +401,7 @@ function startReloadServer() {
398
401
  'Access-Control-Allow-Origin': '*'
399
402
  });
400
403
 
401
- res.write('retry: 1000\n\n');
404
+ res.write('retry: 1000\\n\\n');
402
405
  reloadClients.add(res);
403
406
 
404
407
  req.on('close', () => {
@@ -413,7 +416,7 @@ function startReloadServer() {
413
416
 
414
417
  function notifyReload() {
415
418
  for (const client of reloadClients) {
416
- client.write('data: reload\n\n');
419
+ client.write('data: reload\\n\\n');
417
420
  }
418
421
  }
419
422
 
@@ -478,7 +481,7 @@ function startReloadServer() {
478
481
  'Access-Control-Allow-Origin': '*'
479
482
  });
480
483
 
481
- res.write('retry: 1000\n\n');
484
+ res.write('retry: 1000\\n\\n');
482
485
  reloadClients.add(res);
483
486
 
484
487
  req.on('close', () => {
@@ -493,7 +496,7 @@ function startReloadServer() {
493
496
 
494
497
  function notifyReload() {
495
498
  for (const client of reloadClients) {
496
- client.write('data: reload\n\n');
499
+ client.write('data: reload\\n\\n');
497
500
  }
498
501
  }
499
502