Star

MIT License
Copyright © 2020
CONNECT-platform

linkBundle Configuration

You can add your own client-side scripts to the codedoc bundle using bundle configuration and its init property. Lets say we want to add a function that says hellow:


STEP 1
Add .codedoc/hellow.ts:

.codedoc/hellow.ts
1import { funcTransport } from '@connectv/sdh/transport';

2

3

4export function hellow() {

5 console.log('Hellow');

6}

7

8export const hellow$ = /*#__PURE__*/funcTransport(hellow);


STEP2
Add the transported hellow$ function to your bundle's initialization scripts:

.codedoc/config.ts
1import {

2 configuration,

3 DefaultConfig

4} from '@codedoc/core';

5

6import { hello$ } from './hellow';

7

8//...

9

10export const config = /*#__PURE__*/configuration({

11 //...

12 bundle: {

13 init: [

14 ...DefaultConfig.bundle.init,

15 hellow$

16 ]

17 },

18 //...

19});


Learn More about CONNECTIVE SDH

warning WARNING

Make sure you include DefaultConfig.bundle.init in your initialization scripts array, as otherwise the initialization script for many of CODEDOC features will not be loaded and they will stop working.

Bundle Configuration

Home Overview CLI Theme

Markdownchevron_right
Code Featureschevron_right

Images & Assets

Configurationchevron_right
Customizationchevron_right