@divriots/jampack 0.1.2 → 0.1.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.
Files changed (2) hide show
  1. package/dist/compress.js +9 -2
  2. package/package.json +1 -1
package/dist/compress.js CHANGED
@@ -50,8 +50,15 @@ const addProgress = (r) => {
50
50
  };
51
51
  const printProgress = (r) => {
52
52
  addProgress(r);
53
- process.stdout.cursorTo(0);
54
- process.stdout.write(`${state.total.nbFiles} files | ${formatBytes(state.total.dataLenUncompressed)} → ${formatBytes(state.total.dataLenCompressed)}`);
53
+ const msg = `${state.total.nbFiles} files | ${formatBytes(state.total.dataLenUncompressed)} → ${formatBytes(state.total.dataLenCompressed)}`;
54
+ if (!process.stdout.cursorTo) {
55
+ // In CI we don't have access to cursorTo
56
+ console.log(msg);
57
+ }
58
+ else {
59
+ process.stdout.cursorTo(0);
60
+ process.stdout.write(msg);
61
+ }
55
62
  };
56
63
  const endProgress = () => {
57
64
  process.stdout.write('\n');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@divriots/jampack",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Packer for static websites",
5
5
  "author": "Georges Gomes @georges-gomes",
6
6
  "bin": {