Unverified Commit 4e795932 authored by Benjamin Parisel's avatar Benjamin Parisel Committed by GitHub
Browse files

chore: Bump asciinema player librairy (#104)

* remove bundle file from repository
* allow use to upgrade version easier
* Upgrade asciinema version to 3.0.0
parent 025c5ae9
......@@ -17,8 +17,14 @@ 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'],
libsCss: ['node_modules/@docsearch/css/dist/style.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) => () => {
......@@ -93,7 +99,7 @@ module.exports = (src, dest, preview) => () => {
// NOTE concat already uses stat from newest combined file
.pipe(concat('js/header-site.js')),
vfs
.src(['js/vendor/*.js', '!js/vendor/*.min.js'], { ...opts, read: false })
.src(['js/vendor/*([^.])?(.bundle).js', '!js/vendor/*.min.js'], { ...opts, read: false })
.pipe(
// see https://gulpjs.org/recipes/browserify-multiple-destination.html
map((file, enc, next) => {
......
......@@ -7,7 +7,9 @@
"name": "@antora/ui-default",
"license": "MPL-2.0",
"dependencies": {
"@docsearch/js": "^3.0.0"
"@docsearch/js": "^3.0.0",
"asciinema-player": "^3.0.0",
"highlight.js": "~10.5.0"
},
"devDependencies": {
"@csstools/postcss-sass": "^4.0.0",
......@@ -35,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",
......@@ -637,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",
......@@ -1735,6 +1747,15 @@
"node": "*"
}
},
"node_modules/asciinema-player": {
"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",
"resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz",
......@@ -8248,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": "*"
}
......@@ -13856,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",
......@@ -14915,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",
......@@ -18363,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",
......@@ -19210,6 +19248,15 @@
}
}
},
"asciinema-player": {
"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",
"resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz",
......@@ -24639,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",
......@@ -29042,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",
......@@ -29936,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",
......@@ -44,7 +44,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",
......@@ -65,6 +64,8 @@
"vinyl-fs": "~3.0.3"
},
"dependencies": {
"@docsearch/js": "^3.0.0"
"@docsearch/js": "^3.0.0",
"asciinema-player": "^3.0.0",
"highlight.js": "~10.5.0"
}
}
This diff is collapsed.
<script>window.uiRootPath = '{{{uiRootPath}}}'</script>
<script async src="{{{uiRootPath}}}/js/vendor/asciinema-player.min.js"></script>
<script src="{{{uiRootPath}}}/js/vendor/highlight.min.js"></script>
<script src="{{{uiRootPath}}}/js/vendor/libs.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
......@@ -51,6 +50,14 @@
apiKey: '16267f96d135c47df8454efd5b448c9a',
});
*/
let asciinemaPlayers = document.querySelectorAll('asciinema-player');
asciinemaPlayers.forEach(htmlPlayer => {
let options = {fit: false};
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