diff --git a/.codesandbox/tasks.json b/.codesandbox/tasks.json index e4e3515..02828a8 100644 --- a/.codesandbox/tasks.json +++ b/.codesandbox/tasks.json @@ -9,11 +9,6 @@ // These tasks can be run from CodeSandbox. Running one will open a log in the app. "tasks": { - "start": { - "name": "start", - "command": "npm run start", - "runAtStart": true - }, "dev": { "name": "dev", "command": "npm run dev", @@ -24,19 +19,13 @@ "command": "npm run build", "runAtStart": false }, - "test": { - "name": "test", - "command": "npm run test", - "runAtStart": false - }, - "eject": { - "name": "eject", - "command": "npm run eject", - "runAtStart": false - }, "prettier write": { "name": "prettier write", "command": "npx prettier -w app" + }, + "lint": { + "name": "lint", + "command": "npm run lint" } } } diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index a616d74..996252c 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,12 +1,14 @@ -name: Deploy static content to Pages and Create release on tag +name: Build and deploy to Pages on: + # Runs on pushes targeting the default branch push: - branches: ["main"] + branches: ['main'] + # Allows you to run this workflow manually from the Actions tab workflow_dispatch: -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages permissions: contents: read pages: write @@ -14,7 +16,7 @@ permissions: # Allow one concurrent deployment concurrency: - group: "pages" + group: 'pages' cancel-in-progress: true jobs: @@ -22,22 +24,46 @@ jobs: environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} - build: - permissions: - contents: write runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Setup Node + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Node uses: actions/setup-node@v4 with: node-version: 20 - cache: "npm" + cache: 'npm' - name: Install dependencies run: npm ci - name: Build + run: npm run build + - name: Setup Pages + uses: actions/configure-pages@v4 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: './build' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 + uploadrelease: + runs-on: ubuntu-latest + needs: deploy + if: startsWith(github.ref, 'refs/tags/') + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'npm' + - name: Install dependencies + run: npm ci + - name: Build + run: npm run build + - name: Create archives run: | - npm run build tar -cvzf release.tar.gz --exclude='*.map' -C build . tar -cvzf release-with-maps.tar.gz -C build . - name: GH Release @@ -46,14 +72,4 @@ jobs: with: files: | release.tar.gz - release-with-maps.tar.gz - - name: Setup Pages - uses: actions/configure-pages@v4 - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - # Upload dist folder - path: "./build" - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 + release-with-maps.tar.gz \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 1adbf78..a3436f8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,9 +20,11 @@ "@types/react": "^18", "@types/react-dom": "^18", "@vitejs/plugin-react": "^4", + "autoprefixer": "^10", "eslint": "^9", "eslint-plugin-react-hooks": "^5.1.0-rc.0", "eslint-plugin-react-refresh": "^0.4.9", + "globals": "^11", "postcss": "^8.4.41", "prettier": "3.3.3", "tailwindcss": "^3.4.10", @@ -1676,6 +1678,43 @@ "node": ">=8" } }, + "node_modules/autoprefixer": { + "version": "10.4.20", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.20.tgz", + "integrity": "sha512-XY25y5xSv/wEoqzDyXXME4AFfkZI0P23z6Fs3YgymDnKJkCGOnkL0iTxCa85UTqaSgfcqyf3UA6+c7wUvx/16g==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/autoprefixer" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "browserslist": "^4.23.3", + "caniuse-lite": "^1.0.30001646", + "fraction.js": "^4.3.7", + "normalize-range": "^0.1.2", + "picocolors": "^1.0.1", + "postcss-value-parser": "^4.2.0" + }, + "bin": { + "autoprefixer": "bin/autoprefixer" + }, + "engines": { + "node": "^10 || ^12 || >=14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -2404,6 +2443,19 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/fraction.js": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz", + "integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==", + "dev": true, + "engines": { + "node": "*" + }, + "funding": { + "type": "patreon", + "url": "https://github.com/sponsors/rawify" + } + }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -2923,6 +2975,15 @@ "node": ">=0.10.0" } }, + "node_modules/normalize-range": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",