mirror of
https://github.com/Redocly/redoc.git
synced 2025-02-07 13:30:33 +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:
|
||||
chrome: stable
|
||||
cache: yarn
|
||||
before_script: npm run bundle
|
||||
before_script: npm run bundle && npm run compile:cli
|
||||
deploy:
|
||||
- provider: npm
|
||||
skip_cleanup: true
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"version": "2.0.0-alpha.13",
|
||||
"description": "ReDoc",
|
||||
"main": "bundles/redoc.lib.js",
|
||||
"bin": "bin/cli",
|
||||
"bin": "bin/cli.js",
|
||||
"scripts": {
|
||||
"start": "webpack-dev-server --hot",
|
||||
"start:benchmark": "webpack-dev-server --env.prod --env.perf",
|
||||
|
|
|
@ -26,7 +26,7 @@ export function html2Str(html: string): string {
|
|||
|
||||
// scrollIntoViewIfNeeded polyfill
|
||||
|
||||
if (!(Element as any).prototype.scrollIntoViewIfNeeded) {
|
||||
if (typeof Element !== 'undefined' && !(Element as any).prototype.scrollIntoViewIfNeeded) {
|
||||
(Element as any).prototype.scrollIntoViewIfNeeded = function(centerIfNeeded) {
|
||||
centerIfNeeded = arguments.length === 0 ? true : !!centerIfNeeded;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user