Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some emoji spinners #46

Merged
merged 15 commits into from
Mar 18, 2021
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"devDependencies": {
"ava": "^1.4.1",
"log-update": "^3.2.0",
"string-length": "^4.0.1",
"tsd": "^0.7.2",
"xo": "^0.24.0"
}
Expand Down
124 changes: 122 additions & 2 deletions spinners.json
Original file line number Diff line number Diff line change
Expand Up @@ -1136,8 +1136,8 @@
"grenade": {
"interval": 80,
"frames": [
",
"′ ",
"، ",
"′ ",
" ´ ",
" ‾ ",
" ⸌",
Expand Down Expand Up @@ -1181,5 +1181,125 @@
"βββββρβ",
"ββββββρ"
]
},
"fingerDance": {
"interval": 160,
"frames": [
"🤘 ",
"🤟 ",
"🖖 ",
"✋ ",
"🤚 ",
"👆 "
]
},
"fistBump": {
"interval": 80,
"frames": [
"🤜    🤛 ",
"🤜    🤛 ",
"🤜    🤛 ",
" 🤜  🤛  ",
"  🤜🤛   ",
" 🤜✨🤛   ",
"🤜 ✨ 🤛  "
]
},
"soccerHeader": {
"interval": 80,
"frames": [
" 🧑⚽️ 🧑 ",
"🧑 ⚽️ 🧑 ",
"🧑 ⚽️ 🧑 ",
"🧑 ⚽️ 🧑 ",
"🧑 ⚽️ 🧑 ",
"🧑 ⚽️ 🧑 ",
"🧑 ⚽️🧑 ",
"🧑 ⚽️ 🧑 ",
"🧑 ⚽️ 🧑 ",
"🧑 ⚽️ 🧑 ",
"🧑 ⚽️ 🧑 ",
"🧑 ⚽️ 🧑 "
]
},
"mindblown": {
"interval": 160,
"frames": [
"😐 ",
"😐 ",
"😮 ",
"😮 ",
"😦 ",
"😦 ",
"😧 ",
"😧 ",
"🤯 ",
"💥 ",
"✨ ",
"  ",
"  ",
"  "
]
},
"speaker": {
"interval": 160,
"frames": [
"🔈 ",
"🔉 ",
"🔊 ",
"🔉 "
]
},
"orangePulse": {
"interval": 100,
"frames": [
"🔸 ",
"🔶 ",
"🟠 ",
"🟠 ",
"🔶 "
]
},
"bluePulse": {
"interval": 100,
"frames": [
"🔹 ",
"🔷 ",
"🔵 ",
"🔵 ",
"🔷 "
]
},
"orangeBluePulse": {
"interval": 100,
"frames": [
"🔸 ",
"🔶 ",
"🟠 ",
"🟠 ",
"🔶 ",
"🔹 ",
"🔷 ",
"🔵 ",
"🔵 ",
"🔷 "
]
},
"timeTravel": {
"interval": 100,
"frames": [
"🕛 ",
"🕚 ",
"🕙 ",
"🕘 ",
"🕗 ",
"🕖 ",
"🕕 ",
"🕔 ",
"🕓 ",
"🕒 ",
"🕑 ",
"🕐 "
]
}
}
21 changes: 21 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,29 @@
import test from 'ava';
import stringLength from 'string-length';

import cliSpinners from '.';

test('main', t => {
t.is(typeof cliSpinners, 'object');
t.is(cliSpinners.dots.interval, 80);
t.true(Array.isArray(cliSpinners.dots.frames));
});

test('constant width', t => {
for (const key of Object.keys(cliSpinners)) {
if (key !== 'default') {
nnmrts marked this conversation as resolved.
Show resolved Hide resolved
const {
[key]: {
frames,
frames: [
firstFrame
]
}
} = cliSpinners;

const firstFrameLength = stringLength(firstFrame);

t.true(frames.every(frame => stringLength(frame) === firstFrameLength));
}
}
});