Skip to content

Commit

Permalink
🎉 feat: initial public commit
Browse files Browse the repository at this point in the history
  • Loading branch information
e1en0r committed Mar 29, 2021
0 parents commit 3d5862c
Show file tree
Hide file tree
Showing 718 changed files with 59,250 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"exclude": "node_modules/**",
"presets": [
["@babel/preset-react", { "runtime": "automatic" }],
[
"@babel/preset-env",
{
"modules": false,
"targets": {
"browsers": ["last 2 versions"]
}
}
]
],
"plugins": [
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-transform-runtime",
"@emotion/babel-plugin"
],
"env": {
"test": {
"plugins": ["@babel/plugin-transform-modules-commonjs"]
}
}
}
4 changes: 4 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
>0.2%,
not dead,
not ie <= 11,
not op_mini all
3 changes: 3 additions & 0 deletions .changelogrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
displayTypes: ['feat', 'fix', 'perf', 'refactor', 'revert'],
};
1 change: 1 addition & 0 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = { extends: ['gitmoji'] };
14 changes: 14 additions & 0 deletions .docker/prod/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM node:latest as builder

WORKDIR /opt/app
COPY . /opt/app/

RUN yarn build-docs

# Serve

FROM nginx:1.15-alpine
COPY --from=builder /opt/app/.docz/dist /usr/share/nginx/html
COPY --from=builder /opt/app/.docker/prod/nginx.conf /etc/nginx/conf.d/default.conf

EXPOSE 80
11 changes: 11 additions & 0 deletions .docker/prod/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
server {
listen 80;

location / {
root /usr/share/nginx/html;
index index.html;
try_files $uri $uri/ /index.html =404;
}

include /etc/nginx/extra-conf.d/*.conf;
}
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# http://editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md, *.mdx]
trim_trailing_whitespace = false
11 changes: 11 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
*.json
.docz/
lib/
postcss.config.js
scripts/
src/**/*.test.js
src/styles/
src/icons/
webpack.*.js
jest.config.js
jest.config.ci.js
97 changes: 97 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
{
"extends": ["prettier", "prettier/react", "plugin:jsx-a11y/recommended"],
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"env": {
"browser": true,
"es6": true,
"node": true,
"jest": true
},
"plugins": ["react", "prettier", "json", "react-hooks", "jsx-a11y", "import", "jest"],
"rules": {
"arrow-parens": 0,
"camelcase": 0,
"import/first": 0,
"import/newline-after-import": ["error", { "count": 1 }],
"import/no-named-default": 0,
"import/prefer-default-export": 0,
"import/order": [
"error",
{
"groups": [["builtin", "external"], "internal", ["parent", "sibling", "index"]]
}
],
"no-console": 2,
"no-param-reassign": [2, { "props": false }],
"no-shadow": 0,
"no-underscore-dangle": ["error", { "allow": ["_id"] }],
"no-unused-expressions": 0,
"react-hooks/rules-of-hooks": 2,
"react-hooks/exhaustive-deps": "warn",
"react/forbid-prop-types": 0,
"react/jsx-curly-brace-presence": 0,
"react/jsx-filename-extension": 0,
"react/jsx-props-no-spreading": 0,
"jsx-a11y/anchor-is-valid": ["error", { "components": ["Link"], "specialLink": ["onClick", "to"] }]
},
"globals": {
"document": true,
"window": true
},
"settings": {
"import/resolver": {
"node": {
"paths": ["src"],
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
},
"overrides": [
{
"files": ["**/*.ts", "**/*.tsx"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
},
"project": ["./tsconfig.json"]
},
"plugins": ["@typescript-eslint", "react", "prettier", "json", "react-hooks", "jsx-a11y"],
"rules": {
"arrow-parens": 0,
"camelcase": 0,
"import/first": 0,
"import/no-named-default": 0,
"import/prefer-default-export": 0,
"import/order": [
"error",
{
"groups": [["builtin", "external"], "internal", ["parent", "sibling", "index"]]
}
],
"no-console": 2,
"no-param-reassign": [2, { "props": false }],
"no-shadow": 0,
"no-underscore-dangle": ["error", { "allow": ["_id"] }],
"no-unused-expressions": 0,
"no-void": 0,
"react-hooks/rules-of-hooks": 2,
"react-hooks/exhaustive-deps": "warn",
"react/forbid-prop-types": 0,
"react/jsx-curly-brace-presence": 0,
"react/jsx-filename-extension": 0,
"react/jsx-props-no-spreading": 0,
"jsx-a11y/anchor-is-valid": ["error", { "components": ["Link"], "specialLink": ["onClick", "to"] }]
}
}
]
}
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: CI

on:
push:
branches: [develop]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Git checkout
uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: '15'

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Build library
run: yarn build-lib

- name: Run tests
run: yarn test --ci --coverage
33 changes: 33 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Docs

on:
release:
branches: [main]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Git checkout
uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: '15'

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Build library
run: yarn build-docs

- uses: burnett01/[email protected]
with:
switches: -avz --delete
path: .docz/dist
remote_path: ./phorkit/
remote_host: phork.org
remote_user: phorkit
remote_key: ${{ secrets.DEPLOY_KEY }}
49 changes: 49 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Publish

on:
push:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Git checkout
uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: '15'

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Build library
run: yarn build-lib

- name: Run tests
run: yarn test --ci --coverage

- uses: actions/setup-node@v2
with:
registry-url: 'https://npm.pkg.github.com'

- name: Publish and tag
run: |
# We need npm 7.7.0 or higher; see https://github.com/npm/cli/issues/2834
npm install -g npm@latest
git config user.name github-actions
git config user.email [email protected]
# Create the changelog, update the version and publish using the config from .releaserc
npx semantic-release
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_AUTHOR_NAME: phorkish
GIT_AUTHOR_EMAIL: [email protected]
GIT_COMMITTER_NAME: phorkish
GIT_COMMITTER_EMAIL: [email protected]
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# dependencies
node_modules/

# production
/.docz
/lib

# rollup
.rollup.cache
component-info.json
.size-snapshot.json

# privacy
.env
.npmrc

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
tsconfig.tsbuildinfo

# development
.DS_Store
.vscode
14 changes: 14 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
*.json
.docz/
scripts/
config/
lib/
src/icons/
src/styles/fonts/**
src/components/ErrorBoundary/ErrorBoundary.tsx
src/**/docs/*
src/gatsby-theme-docz/
*.d.ts
*.mdx
.rollup.cache
``
17 changes: 17 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"printWidth": 120,
"singleQuote": true,
"trailingComma": "all",
"arrowParens": "avoid",
"importOrder": [
"^[./]*types(.*)$",
"^[./]*config(.*)$",
"^[./]*context(.*)$",
"^[./]*hooks(.*)$",
"^[./]*utils(.*)$",
"^[./]*icons(.*)$",
"^[./]",
"^[./]*styles(.*)$"
],
"importOrderSeparation": false
}
Loading

0 comments on commit 3d5862c

Please sign in to comment.