mirror of
https://github.com/Redocly/redoc.git
synced 2025-02-12 07:50:34 +03:00
Remove wrong commited files
This commit is contained in:
parent
7b16a13427
commit
b463258170
53
lib/index.ts
53
lib/index.ts
|
@ -1,53 +0,0 @@
|
||||||
'use strict';
|
|
||||||
import './components/Redoc/redoc-initial-styles.css!css';
|
|
||||||
import 'dropkickjs/build/css/dropkick.css!css';
|
|
||||||
import 'prismjs/themes/prism-dark.css!css';
|
|
||||||
import 'hint.css/hint.base.css!css';
|
|
||||||
//import { redocVersion } from './version.js';
|
|
||||||
|
|
||||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
||||||
import { enableProdMode } from '@angular/core';
|
|
||||||
import { Redoc } from './components/index';
|
|
||||||
import { optionsService } from './redoc.module.ts';
|
|
||||||
|
|
||||||
//Redoc.version = redocVersion;
|
|
||||||
var moduleRef;
|
|
||||||
export var init = function(specUrl:string, options) {
|
|
||||||
if (!optionsService.options.debugMode) {
|
|
||||||
enableProdMode();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (moduleRef) {
|
|
||||||
destrot();
|
|
||||||
}
|
|
||||||
|
|
||||||
optionsService.options = options;
|
|
||||||
optionsService.options.specUrl = optionsService.options.specUrl || specUrl;
|
|
||||||
|
|
||||||
Redoc.showLoadingAnimation();
|
|
||||||
return SpecManager.instance().load(specUrl)
|
|
||||||
.then(() => {
|
|
||||||
|
|
||||||
return platformBrowserDynamic().bootstrapModule(MyAppModule);
|
|
||||||
})
|
|
||||||
.then(appRef => {
|
|
||||||
Redoc.hideLoadingAnimation();
|
|
||||||
Redoc.appRef = appRef;
|
|
||||||
console.log('ReDoc bootstrapped!');
|
|
||||||
}).catch(err => {
|
|
||||||
Redoc.hideLoadingAnimation();
|
|
||||||
Redoc.displayError(err);
|
|
||||||
throw err;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export var destroy = function() {
|
|
||||||
//t
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
export var autoInit = function() {
|
|
||||||
// tes
|
|
||||||
};
|
|
||||||
|
|
||||||
autoInit()
|
|
|
@ -1,28 +0,0 @@
|
||||||
import { NgModule, provide } from '@angular/core';
|
|
||||||
import { BrowserDomAdapter } from '@angular/platform-browser/src/browser/browser_adapter';
|
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
|
||||||
|
|
||||||
import { Redoc } from './components/Redoc/redoc';
|
|
||||||
import { OptionsService, RedocEventsService, MenuService,
|
|
||||||
ScrollService, Hash, WarningsService } from './services/index';
|
|
||||||
import { SpecManager } from './utils/SpecManager';
|
|
||||||
|
|
||||||
export const optionsService = new OptionsService(new BrowserDomAdapter());
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [ BrowserModule ],
|
|
||||||
declarations: [ Redoc ],
|
|
||||||
bootstrap: [ Redoc ],
|
|
||||||
providers: [
|
|
||||||
SpecManager,
|
|
||||||
BrowserDomAdapter,
|
|
||||||
RedocEventsService,
|
|
||||||
ScrollService,
|
|
||||||
Hash,
|
|
||||||
MenuService,
|
|
||||||
WarningsService,
|
|
||||||
provide(OptionsService, {useValue: optionsService})
|
|
||||||
],
|
|
||||||
})
|
|
||||||
export class RedocModule {
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user