Skip to content

Commit

Permalink
Merge pull request #50 from Itheum/d-damian
Browse files Browse the repository at this point in the history
DEV : Automatic GitHub pages for TypeDoc
  • Loading branch information
newbreedofgeek authored Sep 18, 2023
2 parents d698f11 + bf4d1ba commit 820615d
Show file tree
Hide file tree
Showing 31 changed files with 11,708 additions and 11,582 deletions.
10 changes: 5 additions & 5 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
build/
dist/
out/
node_modules/
.snapshots/
build/
dist/
out/
node_modules/
.snapshots/
*.min.js
214 changes: 107 additions & 107 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,107 +1,107 @@
{
"env": {
"es2021": true,
"node": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2021,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
},
"project": "./tsconfig.json"
},
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"],
"moduleDirectory": ["node_modules", "src/"]
},
"typescript": {
"alwaysTryTypes": true
}
},
"react": {
"pragma": "React",
"version": "detect"
}
},
"extends": [
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"plugin:prettier/recommended"
],
"plugins": ["react", "prettier", "import"],
"rules": {
"import/order": [
"warn",
{
"groups": ["builtin", "external", "internal"],
"pathGroups": [
{
"pattern": "react",
"group": "external",
"position": "before"
}
],
"pathGroupsExcludedImportTypes": ["react"],
"newlines-between": "ignore",
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
],
"prettier/prettier": [
"error",
{
"endOfLine": "lf"
}
],
"no-restricted-imports": [
"error",
{
"patterns": [
"@mui/*/*/*",
"!@mui/material/test-utils/*",
"!@mui/material/styles/*",
"!@mui/styles/*"
]
}
],
"@typescript-eslint/indent": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-use-before-define": [
"error",
{ "functions": false, "classes": false }
],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"react/jsx-one-expression-per-line": "off",
"react/prop-types": "off",
"linebreak-style": ["error", "unix"],
"quotes": ["error", "single"],
"semi": ["error", "always"],
"object-curly-newline": "off",
"arrow-body-style": "off",
"react/jsx-props-no-spreading": "off",
"implicit-arrow-linebreak": "off",
"func-names": "off",
"operator-linebreak": "off",
"function-paren-newline": "off",
"react/require-default-props": "off",
"react/display-name": "off",
"react/jsx-curly-newline": "off",
"react/jsx-wrap-multilines": "off",
"react/destructuring-assignment": "off",
"no-shadow": "off",
"@typescript-eslint/no-shadow": "off",
"react/no-array-index-key": "off"
}
}
{
"env": {
"es2021": true,
"node": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2021,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
},
"project": "./tsconfig.json"
},
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"],
"moduleDirectory": ["node_modules", "src/"]
},
"typescript": {
"alwaysTryTypes": true
}
},
"react": {
"pragma": "React",
"version": "detect"
}
},
"extends": [
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"plugin:prettier/recommended"
],
"plugins": ["react", "prettier", "import"],
"rules": {
"import/order": [
"warn",
{
"groups": ["builtin", "external", "internal"],
"pathGroups": [
{
"pattern": "react",
"group": "external",
"position": "before"
}
],
"pathGroupsExcludedImportTypes": ["react"],
"newlines-between": "ignore",
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
],
"prettier/prettier": [
"error",
{
"endOfLine": "lf"
}
],
"no-restricted-imports": [
"error",
{
"patterns": [
"@mui/*/*/*",
"!@mui/material/test-utils/*",
"!@mui/material/styles/*",
"!@mui/styles/*"
]
}
],
"@typescript-eslint/indent": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-use-before-define": [
"error",
{ "functions": false, "classes": false }
],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"react/jsx-one-expression-per-line": "off",
"react/prop-types": "off",
"linebreak-style": ["error", "unix"],
"quotes": ["error", "single"],
"semi": ["error", "always"],
"object-curly-newline": "off",
"arrow-body-style": "off",
"react/jsx-props-no-spreading": "off",
"implicit-arrow-linebreak": "off",
"func-names": "off",
"operator-linebreak": "off",
"function-paren-newline": "off",
"react/require-default-props": "off",
"react/display-name": "off",
"react/jsx-curly-newline": "off",
"react/jsx-wrap-multilines": "off",
"react/destructuring-assignment": "off",
"no-shadow": "off",
"@typescript-eslint/no-shadow": "off",
"react/no-array-index-key": "off"
}
}
64 changes: 32 additions & 32 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
name: Publish

on:
workflow_dispatch:

permissions:
contents: write

jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16
registry-url: https://registry.npmjs.org/

- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
RELEASE_TAG=v$(node -p "require('./package.json').version")
gh release create $RELEASE_TAG --target=$GITHUB_SHA --title="$RELEASE_TAG"
- run: npm ci
- run: npm test

- name: Publish to npmjs
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: npm publish --access=public
name: Publish

on:
workflow_dispatch:

permissions:
contents: write

jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16
registry-url: https://registry.npmjs.org/

- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
RELEASE_TAG=v$(node -p "require('./package.json').version")
gh release create $RELEASE_TAG --target=$GITHUB_SHA --title="$RELEASE_TAG"
- run: npm ci
- run: npm test

- name: Publish to npmjs
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: npm publish --access=public
56 changes: 28 additions & 28 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
name: Tests
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop

jobs:
test-job:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Use Node 18.x
uses: actions/setup-node@v3
with:
node-version: '18.x'

- name: Install dependencies
run: npm ci

- name: Test
run: npm test
name: Tests
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop

jobs:
test-job:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Use Node 18.x
uses: actions/setup-node@v3
with:
node-version: '18.x'

- name: Install dependencies
run: npm ci

- name: Test
run: npm test
24 changes: 24 additions & 0 deletions .github/workflows/typedoc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Create documentation and deploy to GitHub Pages
on:
push:
branches:
- main
permissions:
contents: write
jobs:
build-and-deploy:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Create docs
run: |
npm install
npx typedoc src/index.ts
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs
Loading

0 comments on commit 820615d

Please sign in to comment.