Skip to content

Commit 3fc8bb4

Browse files
authored
chore(deps): update docusaurus and prettier source files (#116)
* remove license footer Signed-off-by: Bobby DeSimone <[email protected]> * chore: create .prettierignore and .prettierrc Signed-off-by: Bobby DeSimone <[email protected]> * use really basic prettier Signed-off-by: Bobby DeSimone <[email protected]> * build(deps): update package.json and yarn.lock to 2.1.0 Signed-off-by: Bobby DeSimone <[email protected]> * update prettier files according to docusaurus main project Signed-off-by: Bobby DeSimone <[email protected]> * prettier all the source files Signed-off-by: Bobby DeSimone <[email protected]> Signed-off-by: Bobby DeSimone <[email protected]>
1 parent 54df278 commit 3fc8bb4

24 files changed

+1904
-1568
lines changed

.editorconfig

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
indent_style = space
8+
indent_size = 2
9+
max_line_length = 80
10+
trim_trailing_whitespace = true
11+
12+
[*.md]
13+
insert_final_newline = false
14+
trim_trailing_whitespace = false

.prettierignore

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
src/pb
2+
build
3+
src/theme/index.ts
4+
5+
dist
6+
node_modules
7+
.yarn
8+
build
9+
coverage
10+
.docusaurus
11+
packages/lqip-loader/lib/
12+
packages/docusaurus/lib/
13+
packages/docusaurus-*/lib/*
14+
packages/create-docusaurus/lib/*
15+
packages/create-docusaurus/templates/*/docusaurus.config.js
16+
packages/eslint-plugin/lib/
17+
packages/stylelint-copyright/lib/
18+
__fixtures__
19+
20+
website/i18n
21+
website/versions.json
22+
website/docusaurus.config.js
23+
website/versioned_sidebars/*.json
24+
25+
examples/
26+
website/static/katex/katex.min.css
27+
28+
website/changelog/_swizzle_theme_tests
29+
website/_dogfooding/_swizzle_theme_tests

.prettierrc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"arrowParens": "always",
3+
"bracketSpacing": false,
4+
"bracketSameLine": true,
5+
"printWidth": 80,
6+
"proseWrap": "never",
7+
"singleQuote": true,
8+
"trailingComma": "all"
9+
}

babel.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
2+
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
33
};

docusaurus.config.js

+85-85
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
// @ts-check
22
// Note: type annotations allow type checking and IDEs autocompletion
33

4-
const lightCodeTheme = require("prism-react-renderer/themes/github");
5-
const darkCodeTheme = require("prism-react-renderer/themes/dracula");
6-
const dotenv = require("dotenv");
4+
const lightCodeTheme = require('prism-react-renderer/themes/github');
5+
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
6+
const dotenv = require('dotenv');
77

88
dotenv.config();
99

1010
const config = {
11-
title: "Pomerium",
12-
tagline: "Documentation",
13-
url: "https://www.pomerium.com",
14-
baseUrl: "/",
15-
onBrokenLinks: "throw",
16-
onBrokenMarkdownLinks: "throw",
17-
favicon: "img/favicon.ico",
18-
organizationName: "pomerium",
19-
projectName: "documentation",
11+
title: 'Pomerium',
12+
tagline: 'Documentation',
13+
url: 'https://www.pomerium.com',
14+
baseUrl: '/',
15+
onBrokenLinks: 'throw',
16+
onBrokenMarkdownLinks: 'throw',
17+
favicon: 'img/favicon.ico',
18+
organizationName: 'pomerium',
19+
projectName: 'documentation',
2020
trailingSlash: false,
2121

2222
customFields: {
@@ -25,31 +25,31 @@ const config = {
2525

2626
presets: [
2727
[
28-
"classic",
28+
'@docusaurus/preset-classic',
2929
{
3030
docs: {
31-
path: "content",
32-
routeBasePath: "/",
33-
sidebarPath: require.resolve("./sidebars.js"),
34-
editUrl: "https://github.com/pomerium/documentation/tree/main",
35-
remarkPlugins: [require("mdx-mermaid")],
31+
path: 'content',
32+
routeBasePath: '/',
33+
sidebarPath: require.resolve('./sidebars.js'),
34+
editUrl: 'https://github.com/pomerium/documentation/tree/main',
35+
remarkPlugins: [require('mdx-mermaid')],
3636
},
3737
theme: {
38-
customCss: require.resolve("./src/css/custom.css"),
38+
customCss: require.resolve('./src/css/custom.css'),
3939
},
4040
googleAnalytics: {
4141
trackingID: process.env.GA,
4242
},
4343
sitemap: {
44-
filename: "docs/sitemap.xml",
45-
ignorePatterns: ["/docs/examples/**"],
44+
filename: 'docs/sitemap.xml',
45+
ignorePatterns: ['/docs/examples/**'],
4646
},
4747
},
4848
],
4949
],
5050

5151
themeConfig: {
52-
image: "docs/img/logo.svg",
52+
image: 'docs/img/logo.svg',
5353
algolia: {
5454
appId: process.env.ALGOALIA_APPID,
5555
apiKey: process.env.ALGOLIA_APIKEY,
@@ -58,61 +58,61 @@ const config = {
5858
searchPagePath: false,
5959
},
6060
navbar: {
61-
title: "",
61+
title: '',
6262
logo: {
63-
alt: "Pomerium Logo",
64-
src: "img/logo.svg",
65-
href: "https://www.pomerium.com",
66-
target: "_self",
63+
alt: 'Pomerium Logo',
64+
src: 'img/logo.svg',
65+
href: 'https://www.pomerium.com',
66+
target: '_self',
6767
},
6868
items: [
6969
{
7070
//href: '/',
71-
docId: "docs",
72-
position: "right",
73-
label: "Documentation",
74-
to: "/docs/",
75-
activeBaseRegex: "docs/(?!guides|reference|enterprise)",
71+
docId: 'docs',
72+
position: 'right',
73+
label: 'Documentation',
74+
to: '/docs/',
75+
activeBaseRegex: 'docs/(?!guides|reference|enterprise)',
7676
},
7777
{
78-
type: "doc",
79-
docId: "docs/reference",
80-
position: "right",
81-
label: "Reference",
82-
to: "/docs/reference/",
78+
type: 'doc',
79+
docId: 'docs/reference',
80+
position: 'right',
81+
label: 'Reference',
82+
to: '/docs/reference/',
8383
},
8484
{
85-
type: "docSidebar",
86-
sidebarId: "guides",
87-
position: "right",
88-
label: "Guides",
89-
to: "/docs/guides/",
85+
type: 'docSidebar',
86+
sidebarId: 'guides',
87+
position: 'right',
88+
label: 'Guides',
89+
to: '/docs/guides/',
9090
},
9191
{
92-
type: "doc",
93-
docId: "docs/enterprise/about",
94-
position: "right",
95-
label: "Enterprise",
96-
to: "/docs/enterprise/",
92+
type: 'doc',
93+
docId: 'docs/enterprise/about',
94+
position: 'right',
95+
label: 'Enterprise',
96+
to: '/docs/enterprise/',
9797
},
9898
{
99-
href: "https://github.com/pomerium/documentation",
100-
label: "GitHub",
101-
position: "right",
99+
href: 'https://github.com/pomerium/documentation',
100+
label: 'GitHub',
101+
position: 'right',
102102
},
103103
{
104-
type: "dropdown",
105-
label: "v18",
106-
position: "right",
104+
type: 'dropdown',
105+
label: 'v18',
106+
position: 'right',
107107
items: [
108108
{
109-
label: "v17",
110-
href: "https://v17.docs.pomerium.com/docs",
109+
label: 'v17',
110+
href: 'https://v17.docs.pomerium.com/docs',
111111
},
112112
{
113-
type: "doc",
114-
label: "Archived Versions",
115-
docId: "docs/versions",
113+
type: 'doc',
114+
label: 'Archived Versions',
115+
docId: 'docs/versions',
116116
},
117117
],
118118
},
@@ -121,56 +121,56 @@ const config = {
121121
footer: {
122122
links: [
123123
{
124-
title: "Resources",
124+
title: 'Resources',
125125
items: [
126126
{
127-
label: "Documentation",
128-
to: "https://www.pomerium.com/docs/",
127+
label: 'Documentation',
128+
to: 'https://www.pomerium.com/docs/',
129129
},
130130
{
131-
label: "Community",
132-
to: "https://discuss.pomerium.com/",
131+
label: 'Community',
132+
to: 'https://discuss.pomerium.com/',
133133
},
134134
{
135-
label: "Guides",
136-
to: "https://www.pomerium.com/docs/guides",
135+
label: 'Guides',
136+
to: 'https://www.pomerium.com/docs/guides',
137137
},
138138
{
139-
label: "Comparisons",
140-
to: "https://www.pomerium.com/comparisons/",
139+
label: 'Comparisons',
140+
to: 'https://www.pomerium.com/comparisons/',
141141
},
142142
{
143-
label: "Integrations",
144-
to: "https://www.pomerium.com/integrations/",
143+
label: 'Integrations',
144+
to: 'https://www.pomerium.com/integrations/',
145145
},
146146
],
147147
},
148148
{
149-
title: "Company",
149+
title: 'Company',
150150
items: [
151151
{
152-
label: "Blog",
153-
to: "https://www.pomerium.com/blog/",
152+
label: 'Blog',
153+
to: 'https://www.pomerium.com/blog/',
154154
},
155155
{
156-
label: "About",
157-
to: "https://www.pomerium.com/about/",
156+
label: 'About',
157+
to: 'https://www.pomerium.com/about/',
158158
},
159159
{
160-
label: "Press Kit",
161-
to: "https://www.pomerium.com/press/",
160+
label: 'Press Kit',
161+
to: 'https://www.pomerium.com/press/',
162162
},
163163
{
164-
label: "Careers",
165-
to: "https://www.pomerium.com/careers/",
164+
label: 'Careers',
165+
to: 'https://www.pomerium.com/careers/',
166166
},
167167
],
168168
},
169169
],
170170
logo: {
171-
alt: "Pomerium Logo",
172-
src: "img/logo.svg",
173-
href: "https://www.pomerium.com",
171+
alt: 'Pomerium Logo',
172+
src: 'img/logo.svg',
173+
href: 'https://www.pomerium.com',
174174
width: 161,
175175
height: 28,
176176
},
@@ -179,16 +179,16 @@ const config = {
179179
prism: {
180180
theme: lightCodeTheme,
181181
darkTheme: darkCodeTheme,
182-
additionalLanguages: ["actionscript", "log", "ini", "nginx", "rego"],
182+
additionalLanguages: ['actionscript', 'log', 'ini', 'nginx', 'rego'],
183183
},
184184
},
185185
stylesheets: [
186-
"https://fonts.googleapis.com/icon?family=Material+Icons",
187-
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/brands.min.css",
186+
'https://fonts.googleapis.com/icon?family=Material+Icons',
187+
'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/brands.min.css',
188188
],
189189
plugins: [
190190
[
191-
require.resolve("docusaurus-gtm-plugin"),
191+
require.resolve('docusaurus-gtm-plugin'),
192192
{
193193
id: process.env.GTM,
194194
},

package.json

+7-4
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@
1212
"serve": "docusaurus serve",
1313
"write-translations": "docusaurus write-translations",
1414
"write-heading-ids": "docusaurus write-heading-ids",
15-
"pull-k8s": "bash ./scripts/k8sSettings.sh"
15+
"pull-k8s": "bash ./scripts/k8sSettings.sh",
16+
"format": "prettier --write ."
1617
},
1718
"dependencies": {
18-
"@docusaurus/core": "^2.0.0-beta.21",
19-
"@docusaurus/preset-classic": "^2.0.0-beta.21",
19+
"@docusaurus/core": "^2.1.0",
20+
"@docusaurus/preset-classic": "^2.1.0",
21+
"@docusaurus/theme-common": "^2.1.0",
2022
"@emotion/react": "^11.9.0",
2123
"@emotion/styled": "^11.8.1",
2224
"@mdx-js/react": "^1.6.22",
@@ -47,6 +49,7 @@
4749
]
4850
},
4951
"devDependencies": {
50-
"js-yaml": "^4.1.0"
52+
"js-yaml": "^4.1.0",
53+
"prettier": "^2.7.1"
5154
}
5255
}

scripts/k8sSettingsToJson.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
var inputfile = 'src/ingress.pomerium.io_pomerium.yaml',
2-
outputfile = 'src/k8sSettings.json',
3-
yaml = require('js-yaml'),
4-
fs = require('fs'),
5-
obj = yaml.load(fs.readFileSync(inputfile, {encoding: 'utf-8'}));
2+
outputfile = 'src/k8sSettings.json',
3+
yaml = require('js-yaml'),
4+
fs = require('fs'),
5+
obj = yaml.load(fs.readFileSync(inputfile, {encoding: 'utf-8'}));
66
// this code if you want to save
7-
fs.writeFileSync(outputfile, JSON.stringify(obj, null, 2));
7+
fs.writeFileSync(outputfile, JSON.stringify(obj, null, 2));

0 commit comments

Comments
 (0)