generated from FranciscoKloganB/package-starter
-
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.
- Loading branch information
0 parents
commit fd3bd85
Showing
38 changed files
with
28,767 additions
and
0 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,3 @@ | ||
{ | ||
"extends": ["@commitlint/config-conventional"] | ||
} |
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,5 @@ | ||
NPM_USER=<your_lowercased_github_username> | ||
NPM_PASS=<your_github_pat_with_packages_write_permission> | ||
NPM_EMAIL=<your_github_email> | ||
NPM_REGISTRY=https://npm.pkg.github.com/ | ||
NPM_SCOPE=@owner-or-organization |
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 @@ | ||
dotenv .env |
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,8 @@ | ||
**/.gitignore | ||
**/coverage/ | ||
.github/ | ||
.husky/ | ||
.vscode/ | ||
dist/ | ||
locales/ | ||
node_modules/ |
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,26 @@ | ||
{ | ||
"root": true, | ||
"parser": "@typescript-eslint/parser", | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:prettier/recommended" | ||
], | ||
"plugins": ["@typescript-eslint", "no-only-tests"], | ||
"rules": { | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"max-len": [ | ||
"error", | ||
{ | ||
"code": 88, | ||
"tabWidth": 2 | ||
} | ||
], | ||
"no-only-tests/no-only-tests": "error", | ||
"quotes": [ | ||
"error", | ||
"double", | ||
{ "avoidEscape": false, "allowTemplateLiterals": 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,28 @@ | ||
name: Callable Build Distribution Workflow | ||
|
||
on: [workflow_call] | ||
|
||
jobs: | ||
distribution: | ||
name: Build Distribution (${{ matrix.os }} - ${{ matrix.node }}) | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
node: ["16.14"] | ||
os: [ubuntu-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
cache: "npm" | ||
|
||
- name: Install Dependencies | ||
run: npm install | ||
|
||
- name: Create "dist/" Folder Contents | ||
run: npm run build | ||
|
||
- name: Create Package | ||
run: npm pack |
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,34 @@ | ||
name: Callable Essential Test Workflow | ||
|
||
on: [workflow_call] | ||
|
||
jobs: | ||
test: | ||
name: Essential (${{ matrix.os }}, ${{ matrix.node }}) | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
node: ["16.14"] | ||
os: [ubuntu-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
cache: "npm" | ||
|
||
- name: Install Dependencies | ||
run: npm install | ||
|
||
- name: Scan Vulnerabilities | ||
run: npm audit --production | ||
|
||
- name: Format | ||
run: npm run format | ||
|
||
- name: Lint | ||
run: npm run eslint | ||
|
||
- name: Test Unit | ||
run: npm run test:ci |
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,16 @@ | ||
name: CI | ||
|
||
on: [push] | ||
|
||
jobs: | ||
essential-test: | ||
name: Call Essential Test Workflow | ||
uses: ./.github/workflows/essential-test.yml | ||
|
||
build: | ||
name: Call Build Distribution Workflow | ||
needs: [essential-test] | ||
uses: ./.github/workflows/build-distribution.yml | ||
if: >- | ||
github.ref == 'refs/heads/main' || | ||
github.ref == 'refs/heads/master' |
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,42 @@ | ||
name: Publish | ||
|
||
on: | ||
# Type 'published' triggers if the release is published, no matter it's draft or not. | ||
# Type 'created' triggers when a NON-draft release is created AND published. | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
essential-test: | ||
name: Call Essential Test Workflow | ||
uses: ./.github/workflows/essential-test.yml | ||
|
||
build-publishable-distribution: | ||
name: Publish | ||
needs: [essential] | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: "16.14" | ||
cache: "npm" | ||
registry-url: https://npm.pkg.github.com/ | ||
scope: "@owner-or-organization" | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build Distribution | ||
run: npm run build | ||
|
||
- name: Publish | ||
run: npm publish | ||
env: | ||
# https://docs.github.com/en/[email protected]/packages/working-with-a-github-packages-registry/working-with-the-npm-registry#authenticating-to-github-packages | ||
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,18 @@ | ||
name: Check Bundle Size | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- master | ||
|
||
jobs: | ||
check-bundle-size: | ||
runs-on: ubuntu-latest | ||
env: | ||
CI_JOB_NUMBER: 1 | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: andresz1/size-limit-action@v1 | ||
with: | ||
github_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,43 @@ | ||
# Editor directories and files | ||
.idea/ | ||
.vscode/ | ||
!.vscode/settings.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
|
||
*.log | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? | ||
*.suo | ||
|
||
# Local files | ||
*.local | ||
LOCAL_NOTES.md | ||
|
||
# Local environment files | ||
.env | ||
.env.local | ||
.env.*.local | ||
|
||
# Log files | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
|
||
# NPM | ||
node_modules | ||
dist-ssr | ||
dist | ||
|
||
# Operating System | ||
.DS_Store | ||
|
||
# Tests | ||
/tests/**/videos/ | ||
/tests/**/screenshots/ | ||
/instrumented | ||
/coverage | ||
.nyc_output |
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 @@ | ||
_ |
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,7 @@ | ||
|
||
#!/bin/sh | ||
|
||
. "$(dirname "$0")/_/husky.sh" | ||
. "$(dirname "$0")/common.sh" | ||
|
||
npx commitlint --edit |
Empty file.
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 @@ | ||
#!/bin/sh | ||
|
||
. "$(dirname "$0")/_/husky.sh" | ||
. "$(dirname "$0")/common.sh" | ||
|
||
npx lint-staged |
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 @@ | ||
#!/bin/sh | ||
|
||
. "$(dirname "$0")/_/husky.sh" | ||
. "$(dirname "$0")/common.sh" | ||
|
||
npm run test:ci |
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 @@ | ||
{ | ||
"*.{js,jsx,ts,tsx}": [ | ||
"eslint --fix --ext \"**/*.{js,jsx,ts,tsx}\"", | ||
"prettier --write \"{*,{src,test}/**/*}.+(css|json|js|jsx|ts|tsx)\"" | ||
] | ||
} |
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,30 @@ | ||
app/ | ||
src/ | ||
test/ | ||
|
||
.github/ | ||
.husky/ | ||
.env | ||
.env.* | ||
.envrc | ||
|
||
.commitlintrc.json | ||
.eslintignore | ||
.eslintrc.json | ||
.prettierignore | ||
.prettierrc | ||
.size-limit.json | ||
mangle.json | ||
tsconfig.json | ||
testpkg.sh | ||
jest.config.ts | ||
|
||
**/*.spec.ts | ||
**/*.test.ts | ||
**/*.cy.ts | ||
**/*.e2e.ts | ||
|
||
**/*.spec.js | ||
**/*.test.js | ||
**/*.cy.js | ||
**/*.e2e.js |
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,8 @@ | ||
**/.gitignore | ||
**/coverage/ | ||
.github/ | ||
.husky/ | ||
.vscode/ | ||
dist/ | ||
locales/ | ||
node_modules/ |
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,7 @@ | ||
{ | ||
"printWidth": 88, | ||
"singleQuote": false, | ||
"trailingComma": "none", | ||
"importOrderSeparation": true, | ||
"importOrderSortSpecifiers": 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,14 @@ | ||
[ | ||
{ | ||
"path": "dist/index.js", | ||
"limit": "10 KB" | ||
}, | ||
{ | ||
"path": "dist/index.umd.js", | ||
"limit": "10 KB" | ||
}, | ||
{ | ||
"path": "dist/index.modern.mjs", | ||
"limit": "10 KB" | ||
} | ||
] |
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,12 @@ | ||
{ | ||
"editor.rulers": [88], | ||
"editor.autoClosingQuotes": "always", | ||
"editor.formatOnSave": true, | ||
"editor.formatOnPaste": false, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.quickSuggestions": { | ||
"strings": true // forces VS Code to trigger completions when editing "string" | ||
}, | ||
"prettier.enable": true, | ||
"prettier.configPath": ".prettierrc", | ||
} |
Oops, something went wrong.