Skip to content
This repository was archived by the owner on Nov 22, 2020. It is now read-only.

Commit d88ec8d

Browse files
committed
Add website with minimal edits
1 parent e6f8bfb commit d88ec8d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+25857
-0
lines changed

.browserslistrc

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
> 1%
2+
last 2 versions

.eslintrc.js

+157
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
node: true,
5+
},
6+
parserOptions: {
7+
parser: 'babel-eslint',
8+
},
9+
extends: [
10+
'plugin:vue/essential',
11+
'eslint:recommended',
12+
],
13+
rules: {
14+
// 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
15+
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
16+
17+
'no-await-in-loop': 'warn',
18+
'no-compare-neg-zero': 'error',
19+
'no-extra-parens': ['warn', 'all', {
20+
nestedBinaryExpressions: false,
21+
}],
22+
'no-template-curly-in-string': 'error',
23+
'no-unsafe-negation': 'error',
24+
'valid-jsdoc': ['error', {
25+
requireReturn: false,
26+
requireReturnDescription: false,
27+
prefer: {
28+
return: 'returns',
29+
arg: 'param',
30+
},
31+
preferType: {
32+
String: 'string',
33+
Number: 'number',
34+
Boolean: 'boolean',
35+
Symbol: 'symbol',
36+
object: 'Object',
37+
function: 'Function',
38+
array: 'Array',
39+
date: 'Date',
40+
error: 'Error',
41+
null: 'void',
42+
},
43+
}],
44+
45+
'accessor-pairs': 'warn',
46+
'array-callback-return': 'error',
47+
complexity: 'warn',
48+
'consistent-return': 'error',
49+
curly: ['error', 'multi-line', 'consistent'],
50+
'dot-location': ['error', 'property'],
51+
'dot-notation': 'error',
52+
eqeqeq: 'error',
53+
'no-console': 'off',
54+
'no-empty-function': 'error',
55+
'no-floating-decimal': 'error',
56+
'no-implied-eval': 'error',
57+
'no-invalid-this': 'error',
58+
'no-lone-blocks': 'error',
59+
'no-multi-spaces': 'error',
60+
'no-new-func': 'error',
61+
'no-new-wrappers': 'error',
62+
'no-new': 'error',
63+
'no-octal-escape': 'error',
64+
'no-return-assign': 'error',
65+
'no-return-await': 'error',
66+
'no-self-compare': 'error',
67+
'no-sequences': 'error',
68+
'no-throw-literal': 'error',
69+
'no-unmodified-loop-condition': 'error',
70+
'no-unused-expressions': 'error',
71+
'no-useless-call': 'error',
72+
'no-useless-concat': 'error',
73+
'no-useless-escape': 'error',
74+
'no-useless-return': 'error',
75+
'no-void': 'error',
76+
'no-warning-comments': 'warn',
77+
'prefer-promise-reject-errors': 'error',
78+
'require-await': 'warn',
79+
'wrap-iife': 'error',
80+
yoda: 'error',
81+
82+
'no-label-var': 'error',
83+
'no-shadow': 'error',
84+
'no-undef-init': 'error',
85+
86+
'callback-return': 'error',
87+
'handle-callback-err': 'error',
88+
'no-mixed-requires': 'error',
89+
'no-new-require': 'error',
90+
'no-path-concat': 'error',
91+
92+
'array-bracket-spacing': 'error',
93+
'block-spacing': 'error',
94+
'brace-style': ['error', '1tbs', { allowSingleLine: true }],
95+
'capitalized-comments': ['error', 'always', { ignoreConsecutiveComments: true }],
96+
'comma-dangle': ['error', 'always-multiline'],
97+
'comma-spacing': 'error',
98+
'comma-style': 'error',
99+
'computed-property-spacing': 'error',
100+
'consistent-this': ['error', '$this'],
101+
'eol-last': 'error',
102+
'func-names': 'error',
103+
'func-name-matching': 'error',
104+
'func-style': ['error', 'declaration', { allowArrowFunctions: true }],
105+
indent: ['error', 2, { SwitchCase: 1 }],
106+
'key-spacing': 'error',
107+
'keyword-spacing': 'error',
108+
'max-depth': 'error',
109+
// 'max-len': ['error', 120, 2],
110+
'max-nested-callbacks': ['error', { max: 4 }],
111+
'max-statements-per-line': ['error', { max: 2 }],
112+
'new-cap': 'error',
113+
'newline-per-chained-call': ['error', { ignoreChainWithDepth: 3 }],
114+
'no-array-constructor': 'error',
115+
'no-inline-comments': 'error',
116+
'no-lonely-if': 'error',
117+
'no-mixed-operators': 'error',
118+
'no-multiple-empty-lines': ['error', { max: 2, maxEOF: 1, maxBOF: 0 }],
119+
'no-new-object': 'error',
120+
'no-spaced-func': 'error',
121+
'no-trailing-spaces': 'error',
122+
'no-unneeded-ternary': 'error',
123+
'no-whitespace-before-property': 'error',
124+
'nonblock-statement-body-position': 'error',
125+
'object-curly-spacing': ['error', 'always'],
126+
'operator-assignment': 'error',
127+
'operator-linebreak': ['error', 'after'],
128+
'padded-blocks': ['error', 'never'],
129+
'quote-props': ['error', 'as-needed'],
130+
quotes: ['error', 'single', { avoidEscape: true, allowTemplateLiterals: true }],
131+
'semi-spacing': 'error',
132+
semi: 'error',
133+
'space-before-blocks': 'error',
134+
'space-before-function-paren': ['error', 'never'],
135+
'space-in-parens': 'error',
136+
'space-infix-ops': 'error',
137+
'space-unary-ops': 'error',
138+
'spaced-comment': 'error',
139+
'template-tag-spacing': 'error',
140+
'unicode-bom': 'error',
141+
142+
'arrow-body-style': 'error',
143+
'arrow-parens': ['error', 'as-needed'],
144+
'arrow-spacing': 'error',
145+
'no-duplicate-imports': 'error',
146+
'no-useless-computed-key': 'error',
147+
'no-useless-constructor': 'error',
148+
'prefer-arrow-callback': 'error',
149+
'prefer-numeric-literals': 'error',
150+
'prefer-rest-params': 'error',
151+
'prefer-spread': 'error',
152+
'prefer-template': 'error',
153+
'rest-spread-spacing': 'error',
154+
'template-curly-spacing': 'error',
155+
'yield-star-spacing': 'error',
156+
},
157+
};

.github/workflows/deploy.sh

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
set -euxo pipefail
3+
4+
echo -e "\n# Prepare to do work"
5+
cd $GITHUB_WORKSPACE
6+
REPO="[email protected]:discordjs/website.git"
7+
TARGET_BRANCH="gh-pages"
8+
9+
echo -e "\n# Load SSH key for Git"
10+
mkdir ~/.ssh
11+
echo "${DEPLOY_KEY}" > ~/.ssh/id_rsa
12+
chmod 600 ~/.ssh/id_rsa
13+
eval $(ssh-agent -s)
14+
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
15+
ssh-add ~/.ssh/id_rsa
16+
17+
echo -e "\n# Checkout the repo in the target branch"
18+
git clone $REPO out -b $TARGET_BRANCH
19+
20+
echo -e "\n# Copy built site over"
21+
rm -rf out/*
22+
cp -r dist/* out
23+
24+
echo -e "\n# Commit and push"
25+
cd out
26+
git pull
27+
git add --all .
28+
git config user.name "${GITHUB_ACTOR}"
29+
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
30+
git commit -m "Site build: ${GITHUB_SHA}" || true
31+
git push origin $TARGET_BRANCH

.github/workflows/deploy.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Deployment
2+
on:
3+
push:
4+
branches: [stable]
5+
jobs:
6+
website:
7+
name: Website
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout repository
11+
uses: actions/checkout@v1
12+
13+
- name: Install Node v12
14+
uses: actions/setup-node@v1
15+
with:
16+
node-version: 12
17+
18+
- name: Install dependencies
19+
run: yarn
20+
21+
- name: Build site
22+
run: yarn build
23+
24+
- name: Deploy site
25+
run: bash ./.github/workflows/deploy.sh
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}

.github/workflows/test.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Testing
2+
on: [push, pull_request]
3+
jobs:
4+
lint:
5+
name: ESLint
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Checkout repository
9+
uses: actions/checkout@v1
10+
11+
- name: Install Node v12
12+
uses: actions/setup-node@v1
13+
with:
14+
node-version: 12
15+
16+
- name: Install dependencies
17+
run: yarn
18+
19+
- name: Run ESLint
20+
run: yarn lint
21+
22+
build:
23+
name: Website build
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v1
28+
29+
- name: Install Node v12
30+
uses: actions/setup-node@v1
31+
with:
32+
node-version: 12
33+
34+
- name: Install dependencies
35+
run: yarn
36+
37+
- name: Test site build
38+
run: yarn build

.gitignore

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.DS_Store
2+
node_modules
3+
/dist
4+
5+
# local env files
6+
.env.local
7+
.env.*.local
8+
9+
# Log files
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
14+
# Editor directories and files
15+
.idea
16+
.vscode
17+
*.suo
18+
*.ntvs*
19+
*.njsproj
20+
*.sln
21+
*.sw?

README.md

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# discord.js website
2+
3+
> The website housing documentation for discord.js
4+
5+
## Project setup
6+
```
7+
yarn install
8+
```
9+
10+
### Compiles and hot-reloads for development
11+
```
12+
yarn run serve
13+
```
14+
15+
### Compiles and minifies for production
16+
```
17+
yarn run build
18+
```
19+
20+
### Run your tests
21+
```
22+
yarn run test
23+
```
24+
25+
### Lints and fixes files
26+
```
27+
yarn run lint
28+
```
29+
30+
### Customize configuration
31+
See [Configuration Reference](https://cli.vuejs.org/config/).

babel.config.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
presets: [
3+
'@vue/app',
4+
],
5+
};

0 commit comments

Comments
 (0)