Skip to content

Commit

Permalink
fix animated exec array with sync commands #722
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Dec 23, 2021
1 parent 361182d commit e94adba
Show file tree
Hide file tree
Showing 13 changed files with 34 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -12,7 +12,7 @@
[![npm](https://img.shields.io/badge/npm-2.30.1-blue.svg)](https://www.npmjs.com/package/jquery.terminal)
![bower](https://img.shields.io/badge/bower-2.30.1-yellow.svg)
[![Build and test](https://github.com/jcubic/jquery.terminal/actions/workflows/build.yaml/badge.svg?branch=master&event=push)](https://github.com/jcubic/jquery.terminal/actions/workflows/build.yaml)
[![Coverage Status](https://coveralls.io/repos/github/jcubic/jquery.terminal/badge.svg?branch=master&f1ed231cfa14ccdffd19a376c6e07da2)](https://coveralls.io/github/jcubic/jquery.terminal?branch=master)
[![Coverage Status](https://coveralls.io/repos/github/jcubic/jquery.terminal/badge.svg?branch=master&a3d8f5c3567979aca210315cafaca955)](https://coveralls.io/github/jcubic/jquery.terminal?branch=master)
![downloads](https://img.shields.io/npm/dm/jquery.terminal.svg?style=flat)
[![Paid Support](https://data.jsdelivr.com/v1/package/npm/jquery.terminal/badge?style=rounded)](https://www.jsdelivr.com/package/npm/jquery.terminal)
[![](https://img.shields.io/badge/paid-support-354465.svg)](https://support.jcubic.pl/)
Expand Down
16 changes: 16 additions & 0 deletions __tests__/terminal.spec.js
Expand Up @@ -4926,6 +4926,9 @@ describe('Terminal plugin', function() {

describe('typing animation', function() {
var term = $('<div/>').terminal({
echo: function(value) {
this.echo(value);
},
foo: function() {
return this.echo('HELLO foo', { typing: true });
},
Expand Down Expand Up @@ -4966,6 +4969,19 @@ describe('Terminal plugin', function() {
'HELLO bar'
]);
});
it('should animate exec array with sync commands #722', async function() {
await term.exec(['echo HELLO', 'echo WORLD', 'echo !'], {
typing: 10
});
expect(term.get_output().split('\n')).toEqual([
'> echo HELLO',
'HELLO',
'> echo WORLD',
'WORLD',
'> echo !',
'!'
]);
});
});

describe('exec', function() {
Expand Down
2 changes: 1 addition & 1 deletion css/jquery.terminal-2.30.1.css
Expand Up @@ -12,7 +12,7 @@
* Copyright (c) 2011-2021 Jakub Jankiewicz <https://jcubic.pl/me>
* Released under the MIT license
*
* Date: Tue, 14 Dec 2021 23:15:30 +0000
* Date: Thu, 23 Dec 2021 14:48:48 +0000
*/

.terminal .terminal-output .format, .cmd .format,
Expand Down
2 changes: 1 addition & 1 deletion css/jquery.terminal-2.30.1.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/jquery.terminal.css
Expand Up @@ -12,7 +12,7 @@
* Copyright (c) 2011-2021 Jakub Jankiewicz <https://jcubic.pl/me>
* Released under the MIT license
*
* Date: Tue, 14 Dec 2021 23:15:30 +0000
* Date: Thu, 23 Dec 2021 14:48:48 +0000
*/

.terminal .terminal-output .format, .cmd .format,
Expand Down
2 changes: 1 addition & 1 deletion css/jquery.terminal.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/jquery.terminal.min.css.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions js/jquery.terminal-2.30.1.js
Expand Up @@ -41,7 +41,7 @@
*
* broken image by Sophia Bai from the Noun Project (CC-BY)
*
* Date: Tue, 14 Dec 2021 23:15:29 +0000
* Date: Thu, 23 Dec 2021 14:50:26 +0000
*/
/* global define, Map */
/* eslint-disable */
Expand Down Expand Up @@ -5116,7 +5116,7 @@
// -------------------------------------------------------------------------
$.terminal = {
version: '2.30.1',
date: 'Tue, 14 Dec 2021 23:15:29 +0000',
date: 'Thu, 23 Dec 2021 14:50:26 +0000',
// colors from https://www.w3.org/wiki/CSS/Properties/color/keywords
color_names: [
'transparent', 'currentcolor', 'black', 'silver', 'gray', 'white',
Expand Down Expand Up @@ -9029,6 +9029,7 @@
delay: delay
});
ret.then(function() {
paused = false;
invoke(true);
});
d.then(function() {
Expand Down
4 changes: 2 additions & 2 deletions js/jquery.terminal-2.30.1.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions js/jquery.terminal-src.js
Expand Up @@ -9029,6 +9029,7 @@
delay: delay
});
ret.then(function() {
paused = false;
invoke(true);
});
d.then(function() {
Expand Down
5 changes: 3 additions & 2 deletions js/jquery.terminal.js
Expand Up @@ -41,7 +41,7 @@
*
* broken image by Sophia Bai from the Noun Project (CC-BY)
*
* Date: Tue, 14 Dec 2021 23:15:29 +0000
* Date: Thu, 23 Dec 2021 14:50:26 +0000
*/
/* global define, Map */
/* eslint-disable */
Expand Down Expand Up @@ -5116,7 +5116,7 @@
// -------------------------------------------------------------------------
$.terminal = {
version: '2.30.1',
date: 'Tue, 14 Dec 2021 23:15:29 +0000',
date: 'Thu, 23 Dec 2021 14:50:26 +0000',
// colors from https://www.w3.org/wiki/CSS/Properties/color/keywords
color_names: [
'transparent', 'currentcolor', 'black', 'silver', 'gray', 'white',
Expand Down Expand Up @@ -9029,6 +9029,7 @@
delay: delay
});
ret.then(function() {
paused = false;
invoke(true);
});
d.then(function() {
Expand Down
4 changes: 2 additions & 2 deletions js/jquery.terminal.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/jquery.terminal.min.js.map

Large diffs are not rendered by default.

0 comments on commit e94adba

Please sign in to comment.