Commit e7cbc511 authored by benjaminParisel's avatar benjaminParisel
Browse files

Upgrade asciinema version to 3.0.0

* With new version, the html tag is not available. So we need to create this tag during page processing
parent aff3e397
......@@ -17,8 +17,8 @@ const map = (transform) => new Transform({ objectMode: true, transform })
const through = () => map((file, enc, next) => next(null, file))
const config = {
libsJs: ['node_modules/@docsearch/js/dist/umd/index.js','node_modules/asciinema-player/resources/public/js/asciinema-player.js'],
libsCss: ['node_modules/@docsearch/css/dist/style.css','node_modules/asciinema-player/resources/public/css/asciinema-player.css'],
libsJs: ['node_modules/@docsearch/js/dist/umd/index.js','node_modules/asciinema-player/dist/bundle/asciinema-player.min.js'],
libsCss: ['node_modules/@docsearch/css/dist/style.css','node_modules/asciinema-player/dist/bundle/asciinema-player.css'],
}
module.exports = (src, dest, preview) => () => {
......
......@@ -8,7 +8,7 @@
"license": "MPL-2.0",
"dependencies": {
"@docsearch/js": "^3.0.0",
"asciinema-player": "^2.6.1",
"asciinema-player": "^3.0.0",
"highlight.js": "~10.5.0"
},
"devDependencies": {
......@@ -37,7 +37,6 @@
"gulp-uglify": "~3.0",
"gulp-vinyl-zip": "~2.2",
"handlebars": "~4.7",
"highlight.js": "~10.5.0",
"js-yaml": "~3.13",
"merge-stream": "~2.0",
"open-sans-fonts": "^1.6.2",
......@@ -639,6 +638,17 @@
"node": ">=6.0.0"
}
},
"node_modules/@babel/runtime": {
"version": "7.17.9",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.9.tgz",
"integrity": "sha512-lSiBBvodq29uShpWGNbgFdKYNiFDo5/HIYsaCEY9ff4sb10x9jizo2+pRrSyF4jKZCXqgzuqBOQKbUm90gQwJg==",
"dependencies": {
"regenerator-runtime": "^0.13.4"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/template": {
"version": "7.16.7",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz",
......@@ -1738,9 +1748,13 @@
}
},
"node_modules/asciinema-player": {
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/asciinema-player/-/asciinema-player-2.6.1.tgz",
"integrity": "sha512-W6nW8+X/Krw6aRXQG45qvOZA4g765zbtjoBbjkQl1R7RLPihT00iqMHuHQYbNC1lhFg8x3MkE9ZhOELgSJQX6g=="
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/asciinema-player/-/asciinema-player-3.0.0.tgz",
"integrity": "sha512-YWSOvkIPzg+B88dDTfQQ9Av9r+Wj54i1iUrhxV/en/vGGjNg4XtxYQk+5XjRuhg/DRr6eiYKPu1Kp3B1YsIV8A==",
"dependencies": {
"@babel/runtime": "^7.15.4",
"solid-js": "^1.3.0"
}
},
"node_modules/asn1.js": {
"version": "5.4.1",
......@@ -8255,7 +8269,6 @@
"version": "10.5.0",
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.5.0.tgz",
"integrity": "sha512-xTmvd9HiIHR6L53TMC7TKolEj65zG1XU+Onr8oi86mYa+nLcIbxTTWkpW7CsEwv/vK7u1zb8alZIMLDqqN6KTw==",
"dev": true,
"engines": {
"node": "*"
}
......@@ -13863,6 +13876,11 @@
"node": ">=0.10.0"
}
},
"node_modules/regenerator-runtime": {
"version": "0.13.9",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz",
"integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA=="
},
"node_modules/regex-not": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz",
......@@ -14922,6 +14940,11 @@
"node": ">=0.10.0"
}
},
"node_modules/solid-js": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/solid-js/-/solid-js-1.4.0.tgz",
"integrity": "sha512-VV4d0JnXyBxrWntA18hYoutUNGfv/mufcJZoSUOi0+sKXES0XE2kG4f1LlnnhSU1jMAwRy9cWl/HlBv4O9odyg=="
},
"node_modules/sort-keys": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz",
......@@ -18370,6 +18393,14 @@
"integrity": "sha512-VKXSCQx5D8S04ej+Dqsr1CzYvvWgf20jIw2D+YhQCrIlr2UZGaDds23Y0xg75/skOxpLCRpUZvk/1EAVkGoDOw==",
"dev": true
},
"@babel/runtime": {
"version": "7.17.9",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.9.tgz",
"integrity": "sha512-lSiBBvodq29uShpWGNbgFdKYNiFDo5/HIYsaCEY9ff4sb10x9jizo2+pRrSyF4jKZCXqgzuqBOQKbUm90gQwJg==",
"requires": {
"regenerator-runtime": "^0.13.4"
}
},
"@babel/template": {
"version": "7.16.7",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz",
......@@ -19218,9 +19249,13 @@
}
},
"asciinema-player": {
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/asciinema-player/-/asciinema-player-2.6.1.tgz",
"integrity": "sha512-W6nW8+X/Krw6aRXQG45qvOZA4g765zbtjoBbjkQl1R7RLPihT00iqMHuHQYbNC1lhFg8x3MkE9ZhOELgSJQX6g=="
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/asciinema-player/-/asciinema-player-3.0.0.tgz",
"integrity": "sha512-YWSOvkIPzg+B88dDTfQQ9Av9r+Wj54i1iUrhxV/en/vGGjNg4XtxYQk+5XjRuhg/DRr6eiYKPu1Kp3B1YsIV8A==",
"requires": {
"@babel/runtime": "^7.15.4",
"solid-js": "^1.3.0"
}
},
"asn1.js": {
"version": "5.4.1",
......@@ -24651,8 +24686,7 @@
"highlight.js": {
"version": "10.5.0",
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.5.0.tgz",
"integrity": "sha512-xTmvd9HiIHR6L53TMC7TKolEj65zG1XU+Onr8oi86mYa+nLcIbxTTWkpW7CsEwv/vK7u1zb8alZIMLDqqN6KTw==",
"dev": true
"integrity": "sha512-xTmvd9HiIHR6L53TMC7TKolEj65zG1XU+Onr8oi86mYa+nLcIbxTTWkpW7CsEwv/vK7u1zb8alZIMLDqqN6KTw=="
},
"hmac-drbg": {
"version": "1.0.1",
......@@ -29054,6 +29088,11 @@
}
}
},
"regenerator-runtime": {
"version": "0.13.9",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz",
"integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA=="
},
"regex-not": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz",
......@@ -29948,6 +29987,11 @@
}
}
},
"solid-js": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/solid-js/-/solid-js-1.4.0.tgz",
"integrity": "sha512-VV4d0JnXyBxrWntA18hYoutUNGfv/mufcJZoSUOi0+sKXES0XE2kG4f1LlnnhSU1jMAwRy9cWl/HlBv4O9odyg=="
},
"sort-keys": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz",
......@@ -65,7 +65,7 @@
},
"dependencies": {
"@docsearch/js": "^3.0.0",
"asciinema-player": "^2.6.1",
"asciinema-player": "^3.0.0",
"highlight.js": "~10.5.0"
}
}
......@@ -50,6 +50,14 @@
apiKey: '16267f96d135c47df8454efd5b448c9a',
});
*/
let asciinemaPlayers = document.querySelectorAll('asciinema-player');
asciinemaPlayers.forEach(htmlPlayer => {
let options = {};
htmlPlayer.getAttributeNames().forEach(key => options[key] = htmlPlayer.getAttribute(key));
AsciinemaPlayer.create(htmlPlayer.getAttribute('src'), htmlPlayer, options);
});
</script>
{{/unless}}
{{/unless}}
......
......@@ -6,7 +6,6 @@
{{/unless}}
{{/unless}}
<link rel="stylesheet" href="{{{uiRootPath}}}/stylesheets/vendor/asciinema-player.css">
<link rel="stylesheet" href="{{{uiRootPath}}}/stylesheets/vendor/libs.css">
<link rel="stylesheet" href="{{{uiRootPath}}}/stylesheets/site.css">
<link id="highlight-style-lnk" rel="stylesheet" href="{{{uiRootPath}}}/stylesheets/vendor/highlight-light.css">
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment