Skip to content

Commit

Permalink
feat: First commit
Browse files Browse the repository at this point in the history
BREAKING CHANGES: new package
  • Loading branch information
Nabil-Alsaiad committed Jan 9, 2024
0 parents commit 9a670ed
Show file tree
Hide file tree
Showing 30 changed files with 10,059 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"root": true,
"env": {
"es6": true,
"node": true
},
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "script"
},
"extends": [
"eslint:recommended",
"plugin:jsdoc/recommended",
"plugin:import/recommended",
"plugin:promise/recommended"
],
"plugins": ["jsdoc", "import", "promise"],
"rules": {}
}
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Auto detect text files and perform LF normalization
* text=auto

# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
58 changes: 58 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Generate Documentation

on:
release:
types: [released, published]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: 'pages'
cancel-in-progress: false

jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
registry-url: https://registry.npmjs.org

- name: Install dependencies
run: npm ci

- name: Config
run: npm explore @disqada/typedoc -- npm run config

- name: Generate types
run: npm explore @disqada/typedoc -- npm run types

- name: Clean types
run: npm explore @disqada/typedoc -- npm run clean

- name: Generate docs
run: npm explore @disqada/typedoc -- npm run docs

- name: Setup Pages
uses: actions/configure-pages@v3

- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: './docs'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
43 changes: 43 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Release

on:
workflow_dispatch:

jobs:
release:
permissions:
contents: write
issues: write
pull-requests: write

name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
registry-url: https://registry.npmjs.org

- name: Install dependencies
run: npm ci && npm i --no-save @semantic-release/changelog @semantic-release/git

- name: Config
run: npm explore @disqada/typedoc -- npm run config

- name: Generate types
run: npm explore @disqada/typedoc -- npm run types

- name: Clean types
run: npm explore @disqada/typedoc -- npm run clean

- name: Release
run: npx semantic-release
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37 changes: 37 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Test
on:
push:
pull_request:

concurrency:
# Group based on workflow name and PR if it exists, if no PR, let it run so carryforward flags work
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
registry-url: https://registry.npmjs.org

- name: Install dependencies
run: npm ci

- name: Lint code
run: npm run lint

- name: Format code
run: npm run format

- name: Test code
run: npm test
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Dependency directories
node_modules/

# Generated output
types/
docs/
scrap/
9 changes: 9 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"tabWidth": 2,
"semi": false,
"useTabs": false,
"singleQuote": true,
"endOfLine": "auto",
"trailingComma": "none",
"embeddedLanguageFormatting": "off"
}
17 changes: 17 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"branches": [
"+([0-9])?(.{+([0-9]),x}).x",
"main",
"next",
{ "name": "beta", "prerelease": true },
{ "name": "alpha", "prerelease": true }
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/npm",
"@semantic-release/git",
"@semantic-release/github"
]
}
14 changes: 14 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"recommendations": [
"streetsidesoftware.code-spell-checker",
"visualstudioexptteam.vscodeintellicode",
"christian-kohler.path-intellisense",
"christian-kohler.npm-intellisense",
"chamboug.js-auto-backticks",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"gruntfuggly.todo-tree",
"redhat.vscode-yaml",
"yzhang.markdown-all-in-one"
]
}
41 changes: 41 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSaveMode": "file",
"editor.formatOnType": false,
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.trimAutoWhitespace": true,
"editor.codeActionsOnSave": {
"source.fixAll": "always",
"source.organizeImports": "always"
},

"[markdown]": {
"editor.defaultFormatter": "yzhang.markdown-all-in-one",
"editor.formatOnSaveMode": "file",
"editor.formatOnType": false,
"editor.formatOnPaste": false,
"editor.formatOnSave": true,
"editor.trimAutoWhitespace": true,

"editor.unicodeHighlight.ambiguousCharacters": false,
"editor.unicodeHighlight.invisibleCharacters": false,
"diffEditor.ignoreTrimWhitespace": false,
"editor.wordWrap": "off",
"editor.quickSuggestions": {
"comments": "off",
"strings": "off",
"other": "off"
},

"cSpell.fixSpellingWithRenameProvider": true,
"cSpell.advanced.feature.useReferenceProviderWithRename": true,
"cSpell.advanced.feature.useReferenceProviderRemove": "/^#+\\s/"
},
"markdown.replaceSmartQuotes": true,

"javascript.suggest.jsdoc.generateReturns": true,
"javascript.suggest.completeJSDocs": true,
"javascript.suggest.autoImports": true,
"js/ts.implicitProjectConfig.checkJs": true
}
Empty file added CHANGELOG.md
Empty file.

0 comments on commit 9a670ed

Please sign in to comment.