mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-10 19:06:34 +03:00
fix: fix CLI crash + build it on travis
This commit is contained in:
parent
e8609d228a
commit
7769ba84fd
|
@ -12,7 +12,7 @@ env:
|
||||||
addons:
|
addons:
|
||||||
chrome: stable
|
chrome: stable
|
||||||
cache: yarn
|
cache: yarn
|
||||||
before_script: npm run bundle
|
before_script: npm run bundle && npm run compile:cli
|
||||||
deploy:
|
deploy:
|
||||||
- provider: npm
|
- provider: npm
|
||||||
skip_cleanup: true
|
skip_cleanup: true
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"version": "2.0.0-alpha.13",
|
"version": "2.0.0-alpha.13",
|
||||||
"description": "ReDoc",
|
"description": "ReDoc",
|
||||||
"main": "bundles/redoc.lib.js",
|
"main": "bundles/redoc.lib.js",
|
||||||
"bin": "bin/cli",
|
"bin": "bin/cli.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "webpack-dev-server --hot",
|
"start": "webpack-dev-server --hot",
|
||||||
"start:benchmark": "webpack-dev-server --env.prod --env.perf",
|
"start:benchmark": "webpack-dev-server --env.prod --env.perf",
|
||||||
|
|
|
@ -26,7 +26,7 @@ export function html2Str(html: string): string {
|
||||||
|
|
||||||
// scrollIntoViewIfNeeded polyfill
|
// scrollIntoViewIfNeeded polyfill
|
||||||
|
|
||||||
if (!(Element as any).prototype.scrollIntoViewIfNeeded) {
|
if (typeof Element !== 'undefined' && !(Element as any).prototype.scrollIntoViewIfNeeded) {
|
||||||
(Element as any).prototype.scrollIntoViewIfNeeded = function(centerIfNeeded) {
|
(Element as any).prototype.scrollIntoViewIfNeeded = function(centerIfNeeded) {
|
||||||
centerIfNeeded = arguments.length === 0 ? true : !!centerIfNeeded;
|
centerIfNeeded = arguments.length === 0 ? true : !!centerIfNeeded;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user