-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
7 changed files
with
79 additions
and
84 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 |
---|---|---|
@@ -1,24 +1,24 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- "**" | ||
push: | ||
branches: | ||
- "**" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
cache: "npm" | ||
- name: INSTALL PACKAGES | ||
run: npm install --frozen-lockfile | ||
- name: TYPECHECK | ||
run: npm run type-check | ||
- name: LINT | ||
run: npm run lint | ||
- name: BUILD/BUNDLE | ||
run: npm run build | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
cache: "npm" | ||
- name: INSTALL PACKAGES | ||
run: npm install --frozen-lockfile | ||
- name: TYPECHECK | ||
run: npm run type-check | ||
- name: LINT | ||
run: npm run lint | ||
- name: BUILD/BUNDLE | ||
run: npm run build |
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,38 +1,38 @@ | ||
name: Publish | ||
|
||
on: | ||
workflow_run: | ||
workflows: [CI] | ||
branches: [main] | ||
types: [completed] | ||
workflow_run: | ||
workflows: [CI] | ||
branches: [main] | ||
types: [completed] | ||
|
||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
publish: | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
cache: "npm" | ||
- name: SET NODE_ENV TO "Production" | ||
run: echo "NODE_ENV=production" >> $GITHUB_ENV | ||
- name: INSTALL PACKAGES - INCLUDE DEV | ||
run: npm install --frozen-lockfile --include=dev | ||
- name: BUILD/BUNDLE | ||
run: npm run build | ||
- name: CREATE VERSION & SETUP PULL REQUEST | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
publish: npx changeset publish | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
publish: | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
cache: "npm" | ||
- name: SET NODE_ENV TO "Production" | ||
run: echo "NODE_ENV=production" >> $GITHUB_ENV | ||
- name: INSTALL PACKAGES - INCLUDE DEV | ||
run: npm install --frozen-lockfile --include=dev | ||
- name: BUILD/BUNDLE | ||
run: npm run build | ||
- name: CREATE VERSION & SETUP PULL REQUEST | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
publish: npx changeset publish | ||
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 |
---|---|---|
@@ -1,17 +1,17 @@ | ||
{ | ||
"cSpell.words": [ | ||
"bpac", | ||
"CLIPART", | ||
"DATETIME", | ||
"iife", | ||
"tsup" | ||
], | ||
"liveServer.settings": { | ||
"file": "./test/browser/index.html", | ||
"mount": [ | ||
["/", "./test/browser"] | ||
] | ||
}, | ||
"editor.defaultFormatter": "dbaeumer.vscode-eslint", | ||
"editor.formatOnSave": false | ||
"editor.formatOnSave": false, | ||
"liveServer.settings.file": "./tests/browser/index.html", | ||
"liveServer.settings.mount": [ | ||
["/", "./tests/browser/"] | ||
], | ||
"files.eol": "\n", | ||
"[github-actions-workflow]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
} | ||
} |
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
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
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,27 +1,22 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ES2017", // Target modern browsers for compatibility | ||
"module": "ESNext", // Use ES modules for modern module system | ||
"strict": true, // Enable strict type-checking | ||
"noImplicitAny": true, // Disallow implicit 'any' types | ||
"esModuleInterop": true, // Enable seamless interoperability with CommonJS modules | ||
"skipLibCheck": true, // Skip type checking of declaration files (for faster compilation) | ||
"forceConsistentCasingInFileNames": true, // Enforce consistent file casing for compatibility | ||
"resolveJsonModule": true, // Allow importing JSON files as modules | ||
"allowSyntheticDefaultImports": true, // Allow default imports from modules with no default export | ||
"target": "ES2017", | ||
"module": "ESNext", | ||
"strict": true, | ||
"noImplicitAny": true, | ||
"isolatedModules": true, | ||
"noEmit": true, | ||
"skipLibCheck": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"resolveJsonModule": true, | ||
"noImplicitReturns": true, | ||
"allowImportingTsExtensions": true, | ||
"isolatedModules": true, // Treat each file as a separate module (important for React) | ||
"noEmit": true, //use tsup to emit & bundle | ||
"noUncheckedIndexedAccess": true, | ||
"moduleResolution": "Bundler", // Instructs the compiler to defer module resolution logic to a bundler, ensuring | ||
// compatibility with tools like tsup | ||
"allowJs": true, // Permits inclusion of JavaScript files within the project, enabling a gradual migration to TypeScript. | ||
"checkJs": false, //Disables type checking for JavaScript files, focusing on TypeScript for type safety. | ||
"lib": ["ES2017", "DOM", "DOM.Iterable"] //Includes additional libraries for DOM-related features and newer ECMAScript features, | ||
//supporting web development scenarios. | ||
"moduleResolution": "Bundler", | ||
"allowJs": true, | ||
"checkJs": false, | ||
"lib": ["ES2017", "DOM", "DOM.Iterable"] | ||
}, | ||
"include": ["src/**/*.ts", "src/**/*.js"], // Specifies the root directory and file pattern for inclusion in compilation, | ||
// focusing on TypeScript files within the "src" directory. | ||
"exclude": ["node_modules"] // Excludes the "node_modules" directory from compilation, avoiding redundant | ||
// checks for external dependencies. | ||
"include": ["src/**/*.ts", "src/**/*.js", "tests/*.spec.ts"], | ||
"exclude": ["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