-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1760df0
commit 61877e5
Showing
24 changed files
with
4,849 additions
and
841 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,40 @@ | ||
env: | ||
browser: true | ||
es2021: true | ||
node: true | ||
extends: | ||
- eslint:recommended | ||
- plugin:@typescript-eslint/recommended | ||
parser: '@typescript-eslint/parser' | ||
parserOptions: | ||
ecmaVersion: 12 | ||
sourceType: module | ||
plugins: | ||
- '@typescript-eslint' | ||
- import | ||
rules: | ||
indent: off | ||
"@typescript-eslint/indent": | ||
- error | ||
- 2 | ||
- SwitchCase: 1 | ||
quotes: off | ||
"@typescript-eslint/quotes": | ||
- error | ||
- double | ||
- avoidEscape: true | ||
semi: off | ||
"@typescript-eslint/semi": | ||
- error | ||
- always | ||
comma-dangle: off | ||
"@typescript-eslint/comma-dangle": | ||
- error | ||
- always-multiline | ||
max-len: | ||
- error | ||
- 120 | ||
import/extensions: | ||
- error | ||
- always | ||
- ignorePackages: true |
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,131 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
|
||
timeout-minutes: 20 | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- macos-latest | ||
- windows-latest | ||
node-version: | ||
- 14 | ||
- 16 | ||
|
||
env: | ||
OS: ${{ matrix.os }} | ||
NODE_VERSION: ${{ matrix.node-version }} | ||
RELEASE: ${{ github.ref }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install packages | ||
run: npm ci | ||
|
||
- name: Lint | ||
run: npm run lint | ||
|
||
- name: Build for CommonJS | ||
run: npm run build | ||
|
||
- name: Build for ECMAScript | ||
run: npm run build:es | ||
|
||
release: | ||
name: Create Release | ||
|
||
runs-on: ubuntu-latest | ||
|
||
needs: | ||
- test | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Changelog | ||
id: changelog | ||
uses: ardalanamini/auto-changelog@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Create Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
body: | | ||
${{ steps.changelog.outputs.changelog }} | ||
publish-npm: | ||
name: Publish to NPM | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
runs-on: ubuntu-latest | ||
|
||
needs: | ||
- release | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14 | ||
registry-url: https://registry.npmjs.org | ||
|
||
- run: npm ci | ||
|
||
- run: npm run build:hybrid | ||
|
||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
publish-gpr: | ||
name: Publish to GitHub | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
runs-on: ubuntu-latest | ||
|
||
needs: | ||
- release | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14 | ||
registry-url: https://npm.pkg.github.com | ||
scope: '@ardalanamini' | ||
|
||
- run: sed -i 's/"name":\ "kutt"/"name":\ "@ardalanamini\/kutt"/g' package.json package-lock.json | ||
|
||
- run: npm ci | ||
|
||
- run: npm run build:hybrid | ||
|
||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_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,60 @@ | ||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | ||
|
||
name: Test | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
|
||
timeout-minutes: 15 | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- macos-latest | ||
- windows-latest | ||
node-version: | ||
- 14 | ||
- 16 | ||
|
||
env: | ||
OS: ${{ matrix.os }} | ||
NODE_VERSION: ${{ matrix.node-version }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ matrix.os }}-${{ matrix.node-version }}-modules-${{ hashFiles('**/package-lock.json') }} | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install packages | ||
run: npm i | ||
|
||
- name: Lint | ||
run: npm run lint | ||
|
||
- name: Build for CommonJS | ||
run: npm run build | ||
|
||
- name: Build for ECMAScript | ||
run: npm run build:es |
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 |
---|---|---|
|
@@ -60,4 +60,11 @@ typings/ | |
# next.js build output | ||
.next | ||
|
||
dist | ||
# IDE | ||
.idea/ | ||
.vscode/ | ||
|
||
# Build | ||
*.tsbuildinfo | ||
cjs/ | ||
es/ |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.