@taiga-ui/addon-doc 5.0.0-rc.2 → 5.0.0-rc.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -35,24 +35,21 @@ npm i @taiga-ui/addon-doc
35
35
  ```typescript
36
36
  import {Component} from '@angular/core';
37
37
  import {TuiDocMain} from '@taiga-ui/addon-doc';
38
- import {HIGHLIGHT_OPTIONS} from 'ngx-highlightjs';
38
+ import {provideHighlightOptions} from 'ngx-highlightjs';
39
39
  import {App} from './app.component';
40
40
 
41
41
  @Component({
42
42
  imports: [TuiDocMain],
43
43
  providers: [
44
- {
45
- provide: HIGHLIGHT_OPTIONS,
46
- useValue: {
47
- coreLibraryLoader: () => import('highlight.js/lib/core' as string),
48
- lineNumbersLoader: () => import('highlightjs-line-numbers.js' as string), // Optional, only if you want the line numbers
49
- languages: {
50
- typescript: () => import('highlight.js/lib/languages/typescript' as string),
51
- less: () => import('highlight.js/lib/languages/less' as string),
52
- xml: () => import('highlight.js/lib/languages/xml' as string),
53
- },
44
+ provideHighlightOptions({
45
+ coreLibraryLoader: () => import('highlight.js/lib/core' as string),
46
+ lineNumbersLoader: () => import('ngx-highlightjs/line-numbers' as string), // Optional, only if you want the line numbers
47
+ languages: {
48
+ typescript: () => import('highlight.js/lib/languages/typescript' as string),
49
+ less: () => import('highlight.js/lib/languages/less' as string),
50
+ xml: () => import('highlight.js/lib/languages/xml' as string),
54
51
  },
55
- },
52
+ }),
56
53
  ],
57
54
  })
58
55
  export class App {}