-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add logo * Add API details * Add linting * Add config for debug toggle * Add formatting * Add CI workflow * Fix indent * Pass prop as with value * Add release workflow * Add install * Formatting * Add a test * Add path * Add declaration build * Use contains function
- Loading branch information
Showing
24 changed files
with
698 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
indent_style = tab | ||
insert_final_newline = true | ||
|
||
[{*.yml,package.json,package-lock.json}] | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,40 @@ | ||
{ | ||
"root": true, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": ["@typescript-eslint"] | ||
"root": true, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": ["@typescript-eslint", "import"], | ||
"rules": { | ||
"newline-after-var": ["error", "always"], | ||
"sort-imports": [ | ||
"error", | ||
{ | ||
"allowSeparatedGroups": true, | ||
"ignoreCase": true, | ||
"ignoreDeclarationSort": true | ||
} | ||
], | ||
"import/order": [ | ||
"error", | ||
{ | ||
"groups": [ | ||
"builtin", | ||
"index", | ||
"external", | ||
"internal", | ||
"parent", | ||
"sibling" | ||
], | ||
"pathGroupsExcludedImportTypes": ["builtin"], | ||
"newlines-between": "always", | ||
"alphabetize": { | ||
"order": "asc", | ||
"caseInsensitive": true | ||
} | ||
} | ||
] | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
name: CI | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
release: | ||
default: prerelease | ||
description: 'Type' | ||
options: | ||
- prerelease | ||
- prepatch | ||
- preminor | ||
- premajor | ||
- patch | ||
- minor | ||
- major | ||
required: true | ||
type: choice | ||
pull_request: | ||
push: | ||
branches: main | ||
|
||
jobs: | ||
validate: | ||
name: Validate | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup | ||
id: setup | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'npm' | ||
|
||
- name: Install | ||
run: npm ci | ||
|
||
- name: Lint | ||
run: npm run lint | ||
|
||
- name: Format | ||
run: npm run format | ||
|
||
- name: Test | ||
run: npm test | ||
|
||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
needs: validate | ||
timeout-minutes: 5 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup | ||
id: setup | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'npm' | ||
|
||
- name: Install | ||
run: npm ci | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Upload | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: dist | ||
path: dist | ||
retention-days: 1 | ||
|
||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
needs: build | ||
timeout-minutes: 5 | ||
if: github.ref_name == 'main' | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup | ||
id: setup | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'npm' | ||
|
||
- name: Configure Git | ||
run: | | ||
git config user.name "${GITHUB_ACTOR}" | ||
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | ||
- name: Configure NPM | ||
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Install | ||
run: npm ci | ||
|
||
- name: Download | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: dist | ||
|
||
- name: Beta Release | ||
if: (!inputs.release) || contains(fromJSON('["premajor", "preminor", "prepatch", "prerelease"]'), inputs.release) | ||
run: npm run release -- ${{ inputs.release || 'prerelease' }} --ci --preRelease=beta | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Release | ||
if: inputs.release && contains(fromJSON('["major", "minor", "patch"]'), inputs.release) | ||
run: npm run release -- ${{ inputs.release }} --ci | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dist/**/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,18 @@ | ||
{ | ||
"arrowParens": "avoid", | ||
"bracketSpacing": true, | ||
"endOfLine": "lf", | ||
"editorconfig": true, | ||
"singleQuote": true, | ||
"trailingComma": "es5", | ||
"semi": true, | ||
"useTabs": true | ||
} | ||
"arrowParens": "avoid", | ||
"bracketSpacing": true, | ||
"endOfLine": "lf", | ||
"singleQuote": true, | ||
"trailingComma": "es5", | ||
"semi": true, | ||
"useTabs": true, | ||
"overrides": [ | ||
{ | ||
"files": ["*.yml", "package.json", "package-lock.json"], | ||
"options": { | ||
"tabWidth": 2, | ||
"useTabs": false | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint", | ||
"streetsidesoftware.code-spell-checker" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
{ | ||
"cSpell.words": ["jinju"], | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": true | ||
}, | ||
"typescript.tsdk": "node_modules/typescript/lib", | ||
"typescript.preferences.importModuleSpecifierEnding": "js" | ||
} |
Oops, something went wrong.