Skip to content

Commit 6ef383a

Browse files
authored
Remove loader animation to thin out dependencies (#84)
1 parent da90aba commit 6ef383a

File tree

2 files changed

+7
-18
lines changed

2 files changed

+7
-18
lines changed

cli.js

+7-17
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import path from 'node:path';
44
import process from 'node:process';
5-
import ora from 'ora';
65
import meow from 'meow';
76
import createConfig from './config.js';
87
import { upload, publish, fetchToken } from './wrapper.js';
@@ -63,17 +62,11 @@ const {
6362
deployPercentage,
6463
} = await createConfig(cli.input[0], cli.flags);
6564

66-
const spinner = ora();
67-
const spinnerStart = text => {
68-
spinner.text = text;
69-
return spinner.start();
70-
};
71-
7265
async function doAutoPublish() {
73-
spinnerStart('Fetching token');
66+
console.log('Fetching token...');
7467

7568
const token = await fetchToken(apiConfig);
76-
spinnerStart(`Uploading ${path.basename(zipPath)}`);
69+
console.log(`Uploading ${path.basename(zipPath)}...`);
7770

7871
const uploadResponse = await upload({
7972
apiConfig,
@@ -85,24 +78,23 @@ async function doAutoPublish() {
8578
throw uploadResponse;
8679
}
8780

88-
spinnerStart('Publishing');
81+
console.log('Publishing...');
8982
const publishResponse = await publish(
9083
{ apiConfig, token },
9184
trustedTesters && 'trustedTesters',
9285
deployPercentage,
9386
);
94-
spinner.stop();
87+
9588
handlePublishStatus(publishResponse);
9689
}
9790

9891
async function doUpload() {
99-
spinnerStart(`Uploading ${path.basename(zipPath)}`);
92+
console.log(`Uploading ${path.basename(zipPath)}`);
10093
const response = await upload({
10194
apiConfig,
10295
zipPath,
10396
});
10497

105-
spinner.stop();
10698
if (!isUploadSuccess(response)) {
10799
throw response;
108100
}
@@ -111,20 +103,18 @@ async function doUpload() {
111103
}
112104

113105
async function doPublish() {
114-
spinnerStart('Publishing');
106+
console.log('Publishing');
115107

116108
const response = await publish(
117109
{ apiConfig },
118110
trustedTesters && 'trustedTesters',
119111
deployPercentage,
120112
);
121-
spinner.stop();
113+
122114
handlePublishStatus(response);
123115
}
124116

125117
function errorHandler(error) {
126-
spinner.stop();
127-
128118
console.log(error?.response?.body ?? error);
129119
process.exitCode = 1;
130120

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
"chrome-webstore-upload": "^3.1.0",
5050
"junk": "^4.0.1",
5151
"meow": "^12.1.1",
52-
"ora": "^7.0.1",
5352
"recursive-readdir": "^2.2.3",
5453
"yazl": "^2.5.1"
5554
},

0 commit comments

Comments
 (0)