Skip to content

Commit fd166a7

Browse files
committed
update adr
1 parent 3097c1d commit fd166a7

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

docs/architecture/proposals/004-bundle-refactoring.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,27 @@ await insertAds();
2222
await updateAds();
2323
```
2424

25-
### Initialise step
25+
### Initialise
2626

2727
The consented-advertising file contains lots of information about init scripts that is hard to follow.
2828

29+
This should include what is currently known as `commercialFeatures` and should change `commercialFeatures` from a class into a JSON object or similar.
30+
2931
Open questions:
3032

3133
- How do we know what the correct order/priority is for these init scripts?
3234
- What is comscore? Why does it need to run first? Why does it run on ad free?
3335
-
3436

35-
### Coding Standards
37+
### insertAds
38+
39+
TODO
40+
41+
### updateAds
42+
43+
TODO
44+
45+
## Coding Standards
3646

3747
We propose establishing the following coding standards:
3848

@@ -50,4 +60,5 @@ We propose establishing the following coding standards:
5060
import { initGoogleTag } from '../googletag';
5161
```
5262

53-
-
63+
- **Use pure functions** and avoid using classes where possible. The commercial bundle does not really need to use classes
64+
When side effects are necessary (like DOM manipulation), clearly note this in a JSDoc comment. Ideally we would include an eslint rule to prevent functions with side effects from being added without a suitable explanation for why this is happening

0 commit comments

Comments
 (0)