@vuepress/theme-default 2.0.0-beta.5 → 2.0.0-beta.50-pre

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.
Files changed (86) hide show
  1. package/package.json +45 -29
  2. package/CHANGELOG.md +0 -368
  3. package/lib/clientAppEnhance.d.ts +0 -3
  4. package/lib/clientAppEnhance.js +0 -30
  5. package/lib/clientAppSetup.d.ts +0 -2
  6. package/lib/clientAppSetup.js +0 -11
  7. package/lib/components/DropdownLink.vue +0 -141
  8. package/lib/components/DropdownTransition.vue +0 -34
  9. package/lib/components/Home.vue +0 -133
  10. package/lib/components/NavLink.vue +0 -115
  11. package/lib/components/Navbar.vue +0 -114
  12. package/lib/components/NavbarLinks.vue +0 -174
  13. package/lib/components/Page.vue +0 -30
  14. package/lib/components/PageMeta.vue +0 -139
  15. package/lib/components/PageNav.vue +0 -116
  16. package/lib/components/Sidebar.vue +0 -38
  17. package/lib/components/SidebarChild.d.ts +0 -6
  18. package/lib/components/SidebarChild.js +0 -91
  19. package/lib/components/ToggleSidebarButton.vue +0 -27
  20. package/lib/components/global/Badge.vue +0 -37
  21. package/lib/components/global/CodeGroup.d.ts +0 -5
  22. package/lib/components/global/CodeGroup.js +0 -52
  23. package/lib/components/global/CodeGroupItem.vue +0 -25
  24. package/lib/components/global/OutboundLink.vue +0 -30
  25. package/lib/composables/index.d.ts +0 -5
  26. package/lib/composables/index.js +0 -5
  27. package/lib/composables/useNavLink.d.ts +0 -9
  28. package/lib/composables/useNavLink.js +0 -15
  29. package/lib/composables/useResolveRouteWithRedirect.d.ts +0 -5
  30. package/lib/composables/useResolveRouteWithRedirect.js +0 -24
  31. package/lib/composables/useScrollPromise.d.ts +0 -6
  32. package/lib/composables/useScrollPromise.js +0 -14
  33. package/lib/composables/useSidebarItems.d.ts +0 -31
  34. package/lib/composables/useSidebarItems.js +0 -114
  35. package/lib/composables/useThemeData.d.ts +0 -4
  36. package/lib/composables/useThemeData.js +0 -3
  37. package/lib/index.d.ts +0 -6
  38. package/lib/index.js +0 -67
  39. package/lib/layouts/404.vue +0 -38
  40. package/lib/layouts/Layout.vue +0 -152
  41. package/lib/node/assignDefaultLocaleOptions.d.ts +0 -5
  42. package/lib/node/assignDefaultLocaleOptions.js +0 -56
  43. package/lib/node/index.d.ts +0 -5
  44. package/lib/node/index.js +0 -17
  45. package/lib/node/resolveActiveHeaderLinksPluginOptions.d.ts +0 -6
  46. package/lib/node/resolveActiveHeaderLinksPluginOptions.js +0 -16
  47. package/lib/node/resolveContainerPluginOptions.d.ts +0 -26
  48. package/lib/node/resolveContainerPluginOptions.js +0 -79
  49. package/lib/node/resolveGitPluginOptions.d.ts +0 -6
  50. package/lib/node/resolveGitPluginOptions.js +0 -22
  51. package/lib/node/resolveMediumZoomPluginOptions.d.ts +0 -6
  52. package/lib/node/resolveMediumZoomPluginOptions.js +0 -17
  53. package/lib/shim.d.ts +0 -5
  54. package/lib/styles/_normalize.scss +0 -148
  55. package/lib/styles/_variables.scss +0 -34
  56. package/lib/styles/_wrapper.scss +0 -15
  57. package/lib/styles/arrow.scss +0 -39
  58. package/lib/styles/badge.scss +0 -33
  59. package/lib/styles/code-group.scss +0 -62
  60. package/lib/styles/code.scss +0 -277
  61. package/lib/styles/custom-container.scss +0 -78
  62. package/lib/styles/dropdown.scss +0 -197
  63. package/lib/styles/home.scss +0 -160
  64. package/lib/styles/index.scss +0 -19
  65. package/lib/styles/layout.scss +0 -194
  66. package/lib/styles/navbar.scss +0 -141
  67. package/lib/styles/page.scss +0 -71
  68. package/lib/styles/plugins.scss +0 -18
  69. package/lib/styles/sidebar.scss +0 -152
  70. package/lib/styles/sr-only.scss +0 -12
  71. package/lib/styles/toc.scss +0 -5
  72. package/lib/styles/transitions.scss +0 -13
  73. package/lib/types/index.d.ts +0 -3
  74. package/lib/types/index.js +0 -15
  75. package/lib/types/nav.d.ts +0 -44
  76. package/lib/types/nav.js +0 -2
  77. package/lib/types/options.d.ts +0 -205
  78. package/lib/types/options.js +0 -2
  79. package/lib/types/page.d.ts +0 -32
  80. package/lib/types/page.js +0 -2
  81. package/lib/utils/index.d.ts +0 -2
  82. package/lib/utils/index.js +0 -2
  83. package/lib/utils/resolveEditLink.d.ts +0 -9
  84. package/lib/utils/resolveEditLink.js +0 -23
  85. package/lib/utils/resolveRepoType.d.ts +0 -2
  86. package/lib/utils/resolveRepoType.js +0 -10
@@ -1,71 +0,0 @@
1
- @use 'sass:color';
2
-
3
- @import '_variables';
4
- @import '_wrapper';
5
-
6
- .page {
7
- padding-bottom: 2rem;
8
- display: block;
9
- }
10
-
11
- .page-meta {
12
- @extend %wrapper;
13
- padding-top: 1rem;
14
- padding-bottom: 1rem;
15
- overflow: auto;
16
-
17
- .meta-item {
18
- cursor: default;
19
- margin-top: 0.8rem;
20
-
21
- .meta-item-label {
22
- font-weight: 500;
23
- color: color.scale($textColor, $lightness: 25%);
24
- }
25
-
26
- .meta-item-info {
27
- font-weight: 400;
28
- color: #767676;
29
- }
30
- }
31
-
32
- .edit-link {
33
- display: inline-block;
34
- margin-right: 0.25rem;
35
- }
36
-
37
- .last-updated {
38
- float: right;
39
- }
40
- }
41
-
42
- @media (max-width: $MQMobile) {
43
- .page-meta {
44
- .last-updated {
45
- font-size: 0.8em;
46
- float: none;
47
- }
48
-
49
- .contributors {
50
- font-size: 0.8em;
51
- }
52
- }
53
- }
54
-
55
- .page-nav {
56
- @extend %wrapper;
57
- padding-top: 1rem;
58
- padding-bottom: 0;
59
-
60
- .inner {
61
- min-height: 2rem;
62
- margin-top: 0;
63
- border-top: 1px solid $borderColor;
64
- padding-top: 1rem;
65
- overflow: auto;
66
- }
67
-
68
- .next {
69
- float: right;
70
- }
71
- }
@@ -1,18 +0,0 @@
1
- @use 'sass:color';
2
-
3
- @import '_variables';
4
-
5
- .back-to-top {
6
- --back-to-top-color: #{$accentColor};
7
- --back-to-top-color-hover: #{color.scale($accentColor, $lightness: 30%)};
8
- }
9
-
10
- #nprogress {
11
- --nprogress-color: #{$accentColor};
12
- }
13
-
14
- .DocSearch {
15
- --docsearch-primary-color: #{$accentColor};
16
- --docsearch-highlight-color: var(--docsearch-primary-color);
17
- --docsearch-searchbox-shadow: inset 0 0 0 2px var(--docsearch-primary-color);
18
- }
@@ -1,152 +0,0 @@
1
- @import '_variables';
2
-
3
- .sidebar {
4
- ul {
5
- padding: 0;
6
- margin: 0;
7
- list-style-type: none;
8
- }
9
-
10
- a {
11
- display: inline-block;
12
- }
13
-
14
- .navbar-links {
15
- display: none;
16
- border-bottom: 1px solid $borderColor;
17
- padding: 0.5rem 0 0.75rem 0;
18
-
19
- a {
20
- font-weight: 600;
21
- }
22
-
23
- .navbar-links-item {
24
- display: block;
25
- line-height: 1.25rem;
26
- font-size: 1.1em;
27
- padding: 0.5rem 0 0.5rem 1.5rem;
28
- }
29
- }
30
-
31
- & > .sidebar-links {
32
- padding: 1.5rem 0;
33
-
34
- & > li > a.sidebar-link {
35
- font-size: 1.1em;
36
- line-height: 1.7;
37
- font-weight: bold;
38
- }
39
-
40
- & > li:not(:first-child) {
41
- margin-top: 0.75rem;
42
- }
43
- }
44
- }
45
-
46
- @media (max-width: $MQMobile) {
47
- .sidebar {
48
- .navbar-links {
49
- display: block;
50
-
51
- .dropdown-wrapper
52
- .nav-dropdown
53
- .dropdown-item
54
- a.router-link-active::after {
55
- top: calc(1rem - 2px);
56
- }
57
- }
58
-
59
- & > .sidebar-links {
60
- padding: 1rem 0;
61
- }
62
- }
63
- }
64
-
65
- /**
66
- * sidebar child
67
- */
68
- .sidebar-group {
69
- .sidebar-links > &:not(:first-child) {
70
- margin-top: 0.75rem;
71
- }
72
- .sidebar-group {
73
- & > .sidebar-heading {
74
- opacity: 0.5;
75
- font-size: 0.95em;
76
- line-height: 1.4;
77
- font-weight: normal;
78
- padding-left: 2rem;
79
- }
80
- }
81
- }
82
-
83
- .sidebar-heading {
84
- color: $textColor;
85
- transition: color 0.15s ease;
86
- cursor: default;
87
- font-size: 1.1em;
88
- font-weight: bold;
89
- padding: 0.35rem 1.5rem 0.35rem 1.25rem;
90
- width: 100%;
91
- box-sizing: border-box;
92
- margin: 0;
93
- border-left: 0.25rem solid transparent;
94
-
95
- &.open,
96
- &:hover {
97
- color: inherit;
98
- }
99
-
100
- .arrow {
101
- position: relative;
102
- top: -0.12em;
103
- left: 0.5em;
104
- }
105
- }
106
-
107
- .sidebar .sidebar-sub-headers {
108
- padding-left: 1rem;
109
- font-size: 0.95em;
110
- }
111
-
112
- .sidebar-link {
113
- font-size: 1em;
114
- font-weight: 400;
115
- display: inline-block;
116
- color: $textColor;
117
- border-left: 0.25rem solid transparent;
118
- margin: 0;
119
- padding: 0.35rem 1rem 0.35rem 1.25rem;
120
- line-height: 1.4;
121
- width: 100%;
122
- box-sizing: border-box;
123
-
124
- .sidebar-group & {
125
- padding-left: 2rem;
126
- }
127
-
128
- .sidebar-sub-headers & {
129
- padding-top: 0.25rem;
130
- padding-bottom: 0.25rem;
131
- border-left: none;
132
-
133
- &.active {
134
- font-weight: 500;
135
- }
136
- }
137
- }
138
-
139
- a.sidebar-heading,
140
- a.sidebar-link {
141
- cursor: pointer;
142
-
143
- &.active {
144
- font-weight: 600;
145
- color: $accentColor;
146
- border-left-color: $accentColor;
147
- }
148
-
149
- &:hover {
150
- color: $accentColor;
151
- }
152
- }
@@ -1,12 +0,0 @@
1
- .sr-only {
2
- position: absolute;
3
- width: 1px;
4
- height: 1px;
5
- padding: 0;
6
- margin: -1px;
7
- overflow: hidden;
8
- clip: rect(0, 0, 0, 0);
9
- white-space: nowrap;
10
- border-width: 0;
11
- user-select: none;
12
- }
@@ -1,5 +0,0 @@
1
- .table-of-contents {
2
- .badge {
3
- vertical-align: middle;
4
- }
5
- }
@@ -1,13 +0,0 @@
1
- .fade-slide-y-enter-active {
2
- transition: all 0.3s ease;
3
- }
4
-
5
- .fade-slide-y-leave-active {
6
- transition: all 0.3s cubic-bezier(1, 0.5, 0.8, 1);
7
- }
8
-
9
- .fade-slide-y-enter-from,
10
- .fade-slide-y-leave-to {
11
- transform: translateY(10px);
12
- opacity: 0;
13
- }
@@ -1,3 +0,0 @@
1
- export * from './nav';
2
- export * from './options';
3
- export * from './page';
@@ -1,15 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
- };
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- __exportStar(require("./nav"), exports);
14
- __exportStar(require("./options"), exports);
15
- __exportStar(require("./page"), exports);
@@ -1,44 +0,0 @@
1
- /**
2
- * Base nav item, displayed as text
3
- */
4
- export interface NavItem {
5
- text: string;
6
- ariaLabel?: string;
7
- }
8
- /**
9
- * Base nav group, has nav items children
10
- */
11
- export interface NavGroup<T> extends NavItem {
12
- children: T[];
13
- }
14
- /**
15
- * Props for `<NavLink>`
16
- */
17
- export interface NavLink extends NavItem {
18
- link: string;
19
- rel?: string;
20
- target?: string;
21
- }
22
- /**
23
- * Navbar types
24
- */
25
- export declare type NavbarItem = NavLink;
26
- export declare type NavbarGroup = NavGroup<NavbarGroup | NavbarItem | string>;
27
- export declare type NavbarConfig = (NavbarItem | NavbarGroup | string)[];
28
- export declare type ResolvedNavbarItem = NavbarItem | NavGroup<ResolvedNavbarItem>;
29
- /**
30
- * Sidebar types
31
- */
32
- export interface SidebarItem extends NavLink, NavGroup<NavLink | SidebarItem | string> {
33
- isGroup?: false;
34
- }
35
- export interface SidebarGroup extends NavGroup<SidebarGroup | NavLink | SidebarItem | string> {
36
- isGroup: true;
37
- }
38
- export declare type SidebarConfigArray = (SidebarGroup | SidebarItem | string)[];
39
- export declare type SidebarConfigObject = Record<string, SidebarConfigArray>;
40
- export declare type SidebarConfig = SidebarConfigArray | SidebarConfigObject;
41
- export interface ResolvedSidebarItem extends Partial<NavLink> {
42
- isGroup?: boolean;
43
- children?: ResolvedSidebarItem[];
44
- }
package/lib/types/nav.js DELETED
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,205 +0,0 @@
1
- import type { LocaleData, ThemeConfig } from '@vuepress/core';
2
- import type { ThemeData } from '@vuepress/plugin-theme-data';
3
- import type { NavbarConfig, SidebarConfig } from './nav';
4
- export interface DefaultThemeOptions extends ThemeConfig, DefaultThemeLocaleOptions {
5
- /**
6
- * To avoid confusion with the root `plugins` option,
7
- * we use `themePlugins`
8
- */
9
- themePlugins?: DefaultThemePluginsOptions;
10
- }
11
- export interface DefaultThemePluginsOptions {
12
- /**
13
- * Enable @vuepress/plugin-active-header-links or not
14
- */
15
- activeHeaderLinks?: boolean;
16
- /**
17
- * Enable @vuepress/plugin-back-to-top or not
18
- */
19
- backToTop?: boolean;
20
- /**
21
- * Enable @vuepress/plugin-container or not
22
- */
23
- container?: {
24
- tip?: boolean;
25
- warning?: boolean;
26
- danger?: boolean;
27
- details?: boolean;
28
- codeGroup?: boolean;
29
- codeGroupItem?: boolean;
30
- };
31
- /**
32
- * Enable @vuepress/plugin-git or not
33
- */
34
- git?: boolean;
35
- /**
36
- * Enable @vuepress/plugin-medium-zoom or not
37
- */
38
- mediumZoom?: boolean;
39
- /**
40
- * Enable @vuepress/plugin-nprogress or not
41
- */
42
- nprogress?: boolean;
43
- /**
44
- * Enable @vuepress/plugin-prismjs or not
45
- */
46
- prismjs?: boolean;
47
- }
48
- export declare type DefaultThemeLocaleOptions = DefaultThemeData;
49
- export declare type DefaultThemeData = ThemeData<DefaultThemeLocaleData>;
50
- export interface DefaultThemeLocaleData extends LocaleData {
51
- /**
52
- * Home path of current locale
53
- *
54
- * Used as the link of back-to-home and navbar logo
55
- */
56
- home?: string;
57
- /**
58
- * Navbar config
59
- *
60
- * Set to `false` to disable navbar in current locale
61
- */
62
- navbar?: false | NavbarConfig;
63
- /**
64
- * Navbar logo config
65
- *
66
- * Logo to display in navbar
67
- */
68
- logo?: null | string;
69
- /**
70
- * Navbar repository config
71
- *
72
- * Used for the repository link of navbar
73
- */
74
- repo?: null | string;
75
- /**
76
- * Navbar repository config
77
- *
78
- * Used for the repository text of navbar
79
- */
80
- repoLabel?: string;
81
- /**
82
- * Navbar language selection config
83
- *
84
- * Text of the language selection dropdown
85
- */
86
- selectLanguageText?: string;
87
- /**
88
- * Navbar language selection config
89
- *
90
- * Aria label of of the language selection dropdown
91
- */
92
- selectLanguageAriaLabel?: string;
93
- /**
94
- * Navbar language selection config
95
- *
96
- * Language name of current locale
97
- *
98
- * Displayed inside the language selection dropdown
99
- */
100
- selectLanguageName?: string;
101
- /**
102
- * Sidebar config
103
- *
104
- * Set to `false` to disable sidebar in current locale
105
- */
106
- sidebar?: 'auto' | false | SidebarConfig;
107
- /**
108
- * Page meta - edit link config
109
- *
110
- * Whether to show "Edit this page" or not
111
- */
112
- editLink?: boolean;
113
- /**
114
- * Page meta - edit link config
115
- *
116
- * The text to replace the default "Edit this page"
117
- */
118
- editLinkText?: string;
119
- /**
120
- * Page meta - edit link config
121
- *
122
- * Pattern of edit link
123
- *
124
- * @example ':repo/edit/:branch/:path'
125
- */
126
- editLinkPattern?: string;
127
- /**
128
- * Page meta - edit link config
129
- *
130
- * Use `repo` config by default
131
- *
132
- * Set this config if your docs is placed in a different repo
133
- */
134
- docsRepo?: string;
135
- /**
136
- * Page meta - edit link config
137
- *
138
- * Set this config if the branch of your docs is not 'master'
139
- */
140
- docsBranch?: string;
141
- /**
142
- * Page meta - edit link config
143
- *
144
- * Set this config if your docs is placed in sub dir of your `docsRepo`
145
- */
146
- docsDir?: string;
147
- /**
148
- * Page meta - last updated config
149
- *
150
- * Whether to show "Last Updated" or not
151
- */
152
- lastUpdated?: boolean;
153
- /**
154
- * Page meta - last updated config
155
- *
156
- * The text to replace the default "Last Updated"
157
- */
158
- lastUpdatedText?: string;
159
- /**
160
- * Page meta - contributors config
161
- *
162
- * Whether to show "Contributors" or not
163
- */
164
- contributors?: boolean;
165
- /**
166
- * Page meta - contributors config
167
- *
168
- * The text to replace the default "Contributors"
169
- */
170
- contributorsText?: string;
171
- /**
172
- * Custom block config
173
- *
174
- * Default title of TIP custom block
175
- */
176
- tip?: string;
177
- /**
178
- * Custom block config
179
- *
180
- * Default title of WARNING custom block
181
- */
182
- warning?: string;
183
- /**
184
- * Custom block config
185
- *
186
- * Default title of DANGER custom block
187
- */
188
- danger?: string;
189
- /**
190
- * 404 page config
191
- *
192
- * Not Found messages for 404 page
193
- */
194
- notFound?: string[];
195
- /**
196
- * 404 page config
197
- *
198
- * Text of back-to-home link in 404 page
199
- */
200
- backToHome?: string;
201
- /**
202
- * sr-only message in `<OutboundLink>`
203
- */
204
- openInNewWindow?: string;
205
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,32 +0,0 @@
1
- import type { GitPluginPageData } from '@vuepress/plugin-git';
2
- import type { NavLink, SidebarConfig } from './nav';
3
- export interface DefaultThemePageData extends GitPluginPageData {
4
- filePathRelative: string;
5
- }
6
- export interface DefaultThemeHomePageFrontmatter {
7
- home: true;
8
- heroImage?: string;
9
- heroAlt?: string;
10
- heroText?: string | null;
11
- tagline?: string | null;
12
- actions?: {
13
- text: string;
14
- link: string;
15
- type?: 'primary' | 'secondary';
16
- }[];
17
- features?: {
18
- title: string;
19
- details: string;
20
- }[];
21
- footer?: string;
22
- footerHtml?: boolean;
23
- }
24
- export interface DefaultThemePageFrontmatter {
25
- home?: boolean;
26
- editLink?: boolean;
27
- lastUpdated?: boolean;
28
- contributors?: boolean;
29
- prev?: string | NavLink;
30
- next?: string | NavLink;
31
- sidebar?: 'auto' | false | SidebarConfig;
32
- }
package/lib/types/page.js DELETED
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- export * from './resolveEditLink';
2
- export * from './resolveRepoType';
@@ -1,2 +0,0 @@
1
- export * from './resolveEditLink';
2
- export * from './resolveRepoType';
@@ -1,9 +0,0 @@
1
- import type { RepoType } from './resolveRepoType';
2
- export declare const editLinkPatterns: Record<Exclude<RepoType, null>, string>;
3
- export declare const resolveEditLink: ({ docsRepo, docsBranch, docsDir, filePathRelative, editLinkPattern, }: {
4
- docsRepo: string;
5
- docsBranch: string;
6
- docsDir: string;
7
- filePathRelative: string;
8
- editLinkPattern?: string | undefined;
9
- }) => string | null;
@@ -1,23 +0,0 @@
1
- import { removeLeadingSlash, removeEndingSlash } from '@vuepress/shared';
2
- import { resolveRepoType } from './resolveRepoType';
3
- export const editLinkPatterns = {
4
- GitHub: ':repo/edit/:branch/:path',
5
- GitLab: ':repo/-/edit/:branch/:path',
6
- Bitbucket: ':repo/src/:branch/:path?mode=edit&spa=0&at=:branch&fileviewer=file-view-default',
7
- };
8
- export const resolveEditLink = ({ docsRepo, docsBranch, docsDir, filePathRelative, editLinkPattern, }) => {
9
- const repoType = resolveRepoType(docsRepo);
10
- let pattern;
11
- if (editLinkPattern) {
12
- pattern = editLinkPattern;
13
- }
14
- else if (repoType !== null) {
15
- pattern = editLinkPatterns[repoType];
16
- }
17
- if (!pattern)
18
- return null;
19
- return pattern
20
- .replace(/:repo/, repoType === 'GitHub' ? `https://github.com/${docsRepo}` : docsRepo)
21
- .replace(/:branch/, docsBranch)
22
- .replace(/:path/, removeLeadingSlash(`${removeEndingSlash(docsDir)}/${filePathRelative}`));
23
- };
@@ -1,2 +0,0 @@
1
- export declare type RepoType = 'GitHub' | 'GitLab' | 'Bitbucket' | null;
2
- export declare const resolveRepoType: (repo: string) => RepoType;
@@ -1,10 +0,0 @@
1
- import { isLinkHttp } from '@vuepress/shared';
2
- export const resolveRepoType = (repo) => {
3
- if (!isLinkHttp(repo))
4
- return 'GitHub';
5
- if (/bitbucket\.org/.test(repo))
6
- return 'Bitbucket';
7
- if (/gitlab\.com/.test(repo))
8
- return 'GitLab';
9
- return null;
10
- };