Skip to content

Commit

Permalink
chore: update scripts (#184)
Browse files Browse the repository at this point in the history
* Initial `dev` script and webpack config update

* Update build and profiler scripts

* Revert tsconfig paths

* Update ZIP path

* Use ROOT_DIR

* Do not mangle and disable debug logging in production build
  • Loading branch information
raducristianpopa committed Apr 3, 2024
1 parent 15c5724 commit 528be01
Show file tree
Hide file tree
Showing 33 changed files with 882 additions and 753 deletions.
2 changes: 1 addition & 1 deletion .github/actions/constants.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const BADGE =
'<img src="https://img.shields.io/badge/{{ CONCLUSION }}-{{ BADGE_COLOR }}?style=for-the-badge&label={{ BADGE_LABEL }}" alt="Badge" />'
const BROWSERS = ['chrome', 'firefox', 'opera', 'edge']
const BROWSERS = ['chrome', 'firefox']
const COLORS = {
green: '3fb950',
red: 'd73a49'
Expand Down
10 changes: 0 additions & 10 deletions .github/actions/get-workflow-artifacts.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,6 @@ const ARTIFACTS_DATA = {
name: 'Firefox',
url: null,
size: null
},
opera: {
name: 'Opera',
url: null,
size: null
},
edge: {
name: 'Edge',
url: null,
size: null
}
}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
browser: [chrome, firefox, opera, edge]
browser: [chrome, firefox]
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
Expand All @@ -36,7 +36,7 @@ jobs:
uses: actions/upload-artifact@v3.1.3
with:
name: ${{ github.event.pull_request.number }}-${{ matrix.browser }}
path: dist/${{ matrix.browser }}/${{ matrix.browser }}.zip
path: dist/${{ matrix.browser }}.zip
if-no-files-found: error

test:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,5 @@ jobs:
prerelease: false
generate_release_notes: true
files: |
./dist/chrome/chrome.zip
./dist/firefox/firefox.zip
./dist/opera/opera.zip
./dist/edge/edge.zip
./dist/chrome.zip
./dist/firefox.zip
2 changes: 1 addition & 1 deletion .github/workflows/sanity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
browser: [chrome, firefox, opera, edge]
browser: [chrome, firefox]
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
"url": "https://github.com/interledger/web-monetization-extension"
},
"scripts": {
"analyze": "bash ./scripts/analyze.sh",
"build": "bash ./scripts/build.sh",
"dev": "bash ./scripts/dev.sh",
"build": "tsx ./scripts/build.ts",
"dev": "tsx ./scripts/dev.ts",
"lint": "concurrently \"pnpm:lint:*\"",
"lint:fix": "eslint --ext js,jsx,ts,tsx, src --fix",
"lint:eslint": "eslint . --ext .js,.ts,.tsx --max-warnings 0 --ignore-path .gitignore",
"lint:prettier": "prettier \"**/*.(md|json|yml)\" --ignore-path .gitignore --check",
"lint:type": "tsc --noEmit",
"profiler": "tsx ./scripts/profiler.ts",
"test": "jest --maxWorkers=2 --passWithNoTests",
"test:ci": "pnpm test -- --reporters=default --reporters=github-actions"
},
Expand Down Expand Up @@ -100,6 +100,7 @@
"ts-jest": "^29.1.2",
"ts-loader": "^9.5.1",
"ts-node": "^10.9.2",
"tsx": "^4.7.1",
"typescript": "^5.4.3",
"webpack": "^5.90.3",
"webpack-bundle-analyzer": "^4.10.1",
Expand Down
Loading

0 comments on commit 528be01

Please sign in to comment.