Skip to content

Commit

Permalink
fix(shared-docs): restructure dependencies (angular#2045)
Browse files Browse the repository at this point in the history
Move dependencies unnecessary for the components to a separate section labeled `dependencies`  Since these are not used the by application directly there is no need to add them as `peerDependencies`. As there's no risk of conflicting dependencies in the client bundle, thereby preventing any potential increase in bundle size.
  • Loading branch information
alan-agius4 committed May 3, 2024
1 parent 0581ca5 commit 0108dd3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 21 deletions.
39 changes: 19 additions & 20 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,26 @@
"name": "@angular/docs",
"version": "0.0.0-{SCM_HEAD_SHA}",
"peerDependencies": {
"@angular/cdk": "18.0.0-next.6",
"@angular/common": "18.0.0-next.6",
"@angular/core": "18.0.0-next.6",
"@angular/forms": "18.0.0-next.6",
"@angular/material": "18.0.0-next.6",
"@angular/platform-browser": "18.0.0-next.6",
"@angular/router": "18.0.0-next.6",
"@webcontainer/api": "^1.1.8",
"@angular/cdk": "^18.0.0-next.6",
"@angular/common": "^18.0.0-next.6",
"@angular/core": "^18.0.0-next.6",
"@angular/forms": "^18.0.0-next.6",
"@angular/material": "^18.0.0-next.6",
"@angular/platform-browser": "^18.0.0-next.6",
"@angular/router": "^18.0.0-next.6",
"algoliasearch": "^4.20.0",
"diff": "5.2.0",
"emoji-regex": "10.3.0",
"glob": "10.3.12",
"highlight.js": "11.9.0",
"html-entities": "2.5.2",
"jsdom": "24.0.0",
"jszip": "^3.10.1",
"marked": "12.0.2",
"rxjs": "^7.8.1",
"xterm": "^5.3.0",
"xterm-addon-fit": "^0.8.0",
"zone.js": "^0.14.2"
"rxjs": "^7.8.1"
},
"dependencies": {
"@webcontainer/api": "^1.1.8",
"diff": "~5.2.0",
"emoji-regex": "~10.3.0",
"fast-glob": "~3.3.2",
"highlight.js": "~11.9.0",
"html-entities": "~2.5.2",
"jsdom": "~24.0.0",
"jszip": "~3.10.1",
"marked": "~12.0.2"
},
"exports": {
"./styles/*": {
Expand Down
2 changes: 1 addition & 1 deletion docs/pipeline/guides/tranformations/text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const UNICODE_EMOJI_REGEX = /&#x[\dA-Fa-f]+;/g;
const regex = emojiRegex();

export const textRender: RendererApi['text'] = (text) => {
return text.match(regex) || text.match(UNICODE_EMOJI_REGEX)
return regex.test(text) || UNICODE_EMOJI_REGEX.test(text)
? `<span class="docs-emoji">${text}</span>`
: text;
};

0 comments on commit 0108dd3

Please sign in to comment.