chokibasic 1.0.8 → 1.0.9

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/watcher.js +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chokibasic",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "Basic chokidar watcher + pxpros + esbuild + sass + csso helpers",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -35,7 +35,7 @@
35
35
  "csso": "^5.0.5",
36
36
  "esbuild": "^0.27.3",
37
37
  "ignore": "^7.0.5",
38
- "pxpros": "^1.0.1",
38
+ "pxpros": "^1.0.2",
39
39
  "sass": "^1.97.3"
40
40
  }
41
41
  }
package/src/watcher.js CHANGED
@@ -366,8 +366,8 @@ async function walkAndCopy(dir, src, dest, ig, stats, banner = null) {
366
366
  const copied = await copyFilePreserveTree(abs, src, dest, ig);
367
367
  if (copied) {
368
368
  const lower = abs.toLowerCase();
369
- if (lower.endsWith('.js')) await fsprom.writeFile(copied, "/*!\n\n" + bannerContent + "\n\n*/" + (await fsprom.readFile(copied, 'utf8')), "utf8");
370
- else if (lower.endsWith('.css')) await fsprom.writeFile(copied, "/*!\n\n" + bannerContent + "\n\n*/" + (await fsprom.readFile(copied, 'utf8')), "utf8");
369
+ if (lower.endsWith('.js')) await fsprom.writeFile(copied, "/*!\n\n" + bannerContent + "\n\n*/\n" + (await fsprom.readFile(copied, 'utf8')), "utf8");
370
+ else if (lower.endsWith('.css')) await fsprom.writeFile(copied, "/*!\n\n" + bannerContent + "\n\n*/\n" + (await fsprom.readFile(copied, 'utf8')), "utf8");
371
371
  else if (lower.endsWith('.html')) await fsprom.writeFile(copied, "<!--\n\n" + bannerContent + "\n\n\-->\n" + (await fsprom.readFile(copied, 'utf8')).replaceAll(/###YEAR###/g, (new Date).getFullYear()), "utf8");
372
372
  stats.copied++;
373
373
  }