Skip to content

Commit 01d4440

Browse files
authored
format (#32)
1 parent c205046 commit 01d4440

17 files changed

+3629
-3402
lines changed

Diff for: .eslintrc.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = {
2-
extends: ['standard', 'plugin:vue/recommended'],
2+
extends: ["standard", "plugin:vue/recommended", "prettier"],
33
rules: {
4-
'no-var': 'error',
5-
'prefer-const': 'error'
6-
}
7-
}
4+
"no-var": "error",
5+
"prefer-const": "error",
6+
},
7+
};

Diff for: .github/workflows/GHPages.yml

+24-24
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,27 @@ jobs:
88
deploy-docs:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2
12-
- uses: actions/setup-node@v2
13-
- uses: docker://pandoc/latex:2.9
14-
with:
15-
args: "pandoc ./documents/forJava/Javaコーディング規約.md -s --self-contained --number-sections --toc -t html5 -c ./documents/common/pandoc_styles/css/style.css -o ./.vuepress/public/resources/Javaコーディング規約.html"
16-
- uses: docker://pandoc/latex:2.9
17-
with:
18-
args: "pandoc ./documents/forJava/Javaコーディング規約.md --toc --reference-doc=./documents/common/pandoc_styles/スタイル.docx -s -o ./.vuepress/public/resources/Javaコーディング規約.docx"
19-
- uses: docker://pandoc/latex:2.9
20-
with:
21-
args: "pandoc ./documents/forSQL/SQLコーディング規約(Oracle).md -s --self-contained --number-sections --toc -t html5 -c ./documents/common/pandoc_styles/css/style.css -o ./.vuepress/public/resources/SQLコーディング規約(Oracle).html"
22-
- uses: docker://pandoc/latex:2.9
23-
with:
24-
args: "pandoc ./documents/forSQL/SQLコーディング規約(Oracle).md --toc --reference-doc=./documents/common/pandoc_styles/スタイル.docx -s -o ./.vuepress/public/resources/SQLコーディング規約(Oracle).docx"
25-
- name: Install Packages
26-
run: npm i
27-
- name: Build all
28-
run: npm run build
29-
- name: Deploy
30-
uses: peaceiris/actions-gh-pages@v3
31-
with:
32-
github_token: ${{ secrets.GITHUB_TOKEN }}
33-
publish_dir: ./docs
34-
force_orphan: true
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-node@v2
13+
- uses: docker://pandoc/latex:2.9
14+
with:
15+
args: "pandoc ./documents/forJava/Javaコーディング規約.md -s --self-contained --number-sections --toc -t html5 -c ./documents/common/pandoc_styles/css/style.css -o ./.vuepress/public/resources/Javaコーディング規約.html"
16+
- uses: docker://pandoc/latex:2.9
17+
with:
18+
args: "pandoc ./documents/forJava/Javaコーディング規約.md --toc --reference-doc=./documents/common/pandoc_styles/スタイル.docx -s -o ./.vuepress/public/resources/Javaコーディング規約.docx"
19+
- uses: docker://pandoc/latex:2.9
20+
with:
21+
args: "pandoc ./documents/forSQL/SQLコーディング規約(Oracle).md -s --self-contained --number-sections --toc -t html5 -c ./documents/common/pandoc_styles/css/style.css -o ./.vuepress/public/resources/SQLコーディング規約(Oracle).html"
22+
- uses: docker://pandoc/latex:2.9
23+
with:
24+
args: "pandoc ./documents/forSQL/SQLコーディング規約(Oracle).md --toc --reference-doc=./documents/common/pandoc_styles/スタイル.docx -s -o ./.vuepress/public/resources/SQLコーディング規約(Oracle).docx"
25+
- name: Install Packages
26+
run: npm i
27+
- name: Build all
28+
run: npm run build
29+
- name: Deploy
30+
uses: peaceiris/actions-gh-pages@v3
31+
with:
32+
github_token: ${{ secrets.GITHUB_TOKEN }}
33+
publish_dir: ./docs
34+
force_orphan: true

Diff for: .prettierignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
/docs/

Diff for: .vscode/settings.json

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
{
2-
"eslint.validate": [ "javascript", "javascriptreact", "vue" ],
3-
"eslint.workingDirectories": [
4-
"./",
5-
"./.vuepress"
6-
],
2+
"eslint.validate": ["javascript", "javascriptreact", "vue"],
3+
"eslint.workingDirectories": ["./", "./.vuepress"],
74
"editor.codeActionsOnSave": {
85
"source.fixAll.eslint": true
96
}
10-
}
7+
}

Diff for: .vuepress/components/HomeWithImg.vue

+12-17
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,25 @@
11
<template>
22
<Layout>
3-
<Home
4-
slot="top"
5-
class="java-home-page"
6-
v-bind="$attrs"
7-
v-on="$listeners"
8-
/>
3+
<Home slot="top" class="java-home-page" v-bind="$attrs" v-on="$listeners" />
94
</Layout>
105
</template>
116
<script>
12-
import Layout from '@theme/layouts/Layout.vue'
13-
import Home from '@theme/components/Home.vue'
7+
import Layout from "@theme/layouts/Layout.vue";
8+
import Home from "@theme/components/Home.vue";
149
export default {
1510
components: {
1611
Layout,
17-
Home
18-
}
19-
}
12+
Home,
13+
},
14+
};
2015
</script>
2116
<style scoped>
2217
.java-home-page >>> .hero > img {
23-
position: absolute;
24-
margin-top: 0;
25-
left: 0;
26-
right: 0;
27-
z-index: -1;
28-
opacity: 0.1;
18+
position: absolute;
19+
margin-top: 0;
20+
left: 0;
21+
right: 0;
22+
z-index: -1;
23+
opacity: 0.1;
2924
}
3025
</style>

Diff for: .vuepress/components/PageInfo.vue

+22-22
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
data-size="small"
99
data-show-faces="true"
1010
data-share="true"
11-
style="height: 20px; line-height: 20px;"
11+
style="height: 20px; line-height: 20px"
1212
/>
1313
<a
1414
:href="hatena"
@@ -22,47 +22,47 @@
2222
alt="このエントリーをはてなブックマークに追加"
2323
width="20"
2424
height="20"
25-
style="border: none;"
26-
>
25+
style="border: none"
26+
/>
2727
</a>
2828
</div>
2929
</template>
3030

3131
<script>
32-
import { addFacebook, addHatenaBookmark } from './sns'
32+
import { addFacebook, addHatenaBookmark } from "./sns";
3333
34-
function debounce (fn, timeout) {
35-
let timeoutId
34+
function debounce(fn, timeout) {
35+
let timeoutId;
3636
return () => {
3737
if (timeoutId != null) {
38-
clearTimeout(timeoutId)
38+
clearTimeout(timeoutId);
3939
}
40-
timeoutId = setTimeout(fn, timeout)
41-
}
40+
timeoutId = setTimeout(fn, timeout);
41+
};
4242
}
4343
4444
const loadScript = debounce(function () {
45-
addFacebook()
46-
addHatenaBookmark()
47-
}, 1000)
45+
addFacebook();
46+
addHatenaBookmark();
47+
}, 1000);
4848
4949
export default {
50-
name: 'PageInfo',
50+
name: "PageInfo",
5151
props: {
5252
href: {
5353
type: String,
54-
required: true
55-
}
54+
required: true,
55+
},
5656
},
5757
computed: {
58-
hatena () {
59-
return this.href.replace('https://', 'https://b.hatena.ne.jp/entry/s/')
60-
}
58+
hatena() {
59+
return this.href.replace("https://", "https://b.hatena.ne.jp/entry/s/");
60+
},
6161
},
62-
mounted () {
63-
loadScript()
64-
}
65-
}
62+
mounted() {
63+
loadScript();
64+
},
65+
};
6666
</script>
6767

6868
<style scoped>

Diff for: .vuepress/components/PageTitle.vue

+28-23
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@
1919
data-share="true"
2020
/>
2121
<a
22-
:href="'http://b.hatena.ne.jp/entry/s/future-architect.github.io/coding-standards'+$page.path"
22+
:href="
23+
'http://b.hatena.ne.jp/entry/s/future-architect.github.io/coding-standards' +
24+
$page.path
25+
"
2326
class="hatena-bookmark-button"
2427
data-hatena-bookmark-layout="basic-label-counter"
2528
data-hatena-bookmark-lang="ja"
@@ -30,8 +33,8 @@
3033
alt="このエントリーをはてなブックマークに追加"
3134
width="20"
3235
height="20"
33-
style="border: none;"
34-
>
36+
style="border: none"
37+
/>
3538
</a>
3639

3740
<component
@@ -51,7 +54,8 @@
5154
:data-save-url="pageUrl"
5255
data-pocket-count="horizontal"
5356
data-pocket-align="left"
54-
>Pocket</a>
57+
>Pocket</a
58+
>
5559
</div>
5660

5761
<h1 class="vuepress-page-title__title">
@@ -64,36 +68,37 @@
6468
</template>
6569

6670
<script>
67-
import { addTwitter, addFacebook, addHatenaBookmark, addPocket } from './sns'
71+
import { addTwitter, addFacebook, addHatenaBookmark, addPocket } from "./sns";
6872
/**
6973
* `markdown-it-plugin-header-shift`でheaderタグを1つづつずらす前提であるため、Markdownファイルにはタイトルがありません。
7074
* これを回避するためにMarkdownファイルの先頭に`<page-title/>`を記述させることでタイトルを表示させます。
7175
*/
7276
export default {
73-
name: 'PageTitle',
77+
name: "PageTitle",
7478
data: function () {
7579
return {
76-
GithubButton: 'div'
77-
}
80+
GithubButton: "div",
81+
};
7882
},
7983
computed: {
80-
pageUrl () {
81-
return 'https://future-architect.github.io/coding-standards' + this.$page.path
82-
}
84+
pageUrl() {
85+
return (
86+
"https://future-architect.github.io/coding-standards" + this.$page.path
87+
);
88+
},
8389
},
84-
mounted () {
85-
import('vue-github-button').then(({ default: GithubButton }) => {
86-
this.GithubButton = GithubButton
87-
})
90+
mounted() {
91+
import("vue-github-button").then(({ default: GithubButton }) => {
92+
this.GithubButton = GithubButton;
93+
});
8894
setTimeout(() => {
89-
addTwitter()
90-
addFacebook()
91-
addHatenaBookmark()
92-
addPocket()
93-
}, 10)
94-
}
95-
}
96-
95+
addTwitter();
96+
addFacebook();
97+
addHatenaBookmark();
98+
addPocket();
99+
}, 10);
100+
},
101+
};
97102
</script>
98103

99104
<style scoped>

Diff for: .vuepress/components/sns.js

+33-34
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,51 @@
1-
2-
export function addTwitter () {
3-
const id = 'twitter-wjs'
1+
export function addTwitter() {
2+
const id = "twitter-wjs";
43
if (document.getElementById(id)) {
5-
window.twttr.widgets.load()
4+
window.twttr.widgets.load();
65
} else {
7-
const fjs = document.getElementsByTagName('script')[0]
8-
const p = /^http:/.test(document.location) ? 'http' : 'https'
9-
const js = document.createElement('script')
10-
js.id = id
11-
js.src = p + '://platform.twitter.com/widgets.js'
12-
fjs.parentNode.insertBefore(js, fjs)
6+
const fjs = document.getElementsByTagName("script")[0];
7+
const p = /^http:/.test(document.location) ? "http" : "https";
8+
const js = document.createElement("script");
9+
js.id = id;
10+
js.src = p + "://platform.twitter.com/widgets.js";
11+
fjs.parentNode.insertBefore(js, fjs);
1312
}
1413
}
1514

16-
export function addFacebook () {
17-
const id = 'facebook-jssdk'
15+
export function addFacebook() {
16+
const id = "facebook-jssdk";
1817
if (document.getElementById(id)) {
19-
window.FB.XFBML.parse()
18+
window.FB.XFBML.parse();
2019
} else {
21-
const fjs = document.getElementsByTagName('script')[0]
22-
const p = /^http:/.test(document.location) ? 'http' : 'https'
23-
const js = document.createElement('script')
24-
js.id = id
25-
js.src = p + '://connect.facebook.net/ja_JP/sdk.js#xfbml=1&version=v3.2'
26-
fjs.parentNode.insertBefore(js, fjs)
20+
const fjs = document.getElementsByTagName("script")[0];
21+
const p = /^http:/.test(document.location) ? "http" : "https";
22+
const js = document.createElement("script");
23+
js.id = id;
24+
js.src = p + "://connect.facebook.net/ja_JP/sdk.js#xfbml=1&version=v3.2";
25+
fjs.parentNode.insertBefore(js, fjs);
2726
}
2827
}
2928

30-
export function addHatenaBookmark () {
31-
const id = 'hatena-buttons'
29+
export function addHatenaBookmark() {
30+
const id = "hatena-buttons";
3231
if (document.getElementById(id)) {
33-
return
32+
return;
3433
}
35-
const fjs = document.getElementsByTagName('script')[0]
36-
const p = /^http:/.test(document.location) ? 'http' : 'https'
37-
const js = document.createElement('script')
38-
js.id = id
39-
js.src = p + '://b.st-hatena.com/js/bookmark_button.js'
40-
fjs.parentNode.insertBefore(js, fjs)
34+
const fjs = document.getElementsByTagName("script")[0];
35+
const p = /^http:/.test(document.location) ? "http" : "https";
36+
const js = document.createElement("script");
37+
js.id = id;
38+
js.src = p + "://b.st-hatena.com/js/bookmark_button.js";
39+
fjs.parentNode.insertBefore(js, fjs);
4140
}
4241

43-
export function addPocket (p) {
44-
const id = 'pocket-btn-js' + p
42+
export function addPocket(p) {
43+
const id = "pocket-btn-js" + p;
4544
// if (document.getElementById(id)) {
4645
// cannot reload?
4746
// }
48-
const j = document.createElement('script')
49-
j.id = id
50-
j.src = 'https://widgets.getpocket.com/v1/j/btn.js?v=1'
51-
document.body.appendChild(j)
47+
const j = document.createElement("script");
48+
j.id = id;
49+
j.src = "https://widgets.getpocket.com/v1/j/btn.js?v=1";
50+
document.body.appendChild(j);
5251
}

0 commit comments

Comments
 (0)