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
1linkimport { funcTransport } from '@connectv/sdh/transport';

2link

3link

4linkexport function hellow() {

5link console.log('Hellow');

6link}

7link

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


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

.codedoc/config.ts
1linkimport {

2link configuration,

3link DefaultConfig

4link} from '@codedoc/core';

5link

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

7link

8link//...

9link

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

11link //...

12link bundle: {

13link init: [

14link ...DefaultConfig.bundle.init,

15link hellow$

16link ]

17link },

18link //...

19link});


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