From eeaee1456d1bbcfbb5ce3206e05bc0f22be5069b Mon Sep 17 00:00:00 2001 From: TrebledJ <39648915+TrebledJ@users.noreply.github.com> Date: Fri, 3 Nov 2023 01:40:37 +0800 Subject: [PATCH] chore: refactor run scripts --- .github/workflows/deploy.yml | 2 +- package.json | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 12f731db0..e34bd7e50 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -83,7 +83,7 @@ jobs: run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }} - name: Build - run: ${{ steps.detect-package-manager.outputs.manager }} run build-ghpages + run: ${{ steps.detect-package-manager.outputs.manager }} run prod - name: Commit & Push Site Build uses: stefanzweifel/git-auto-commit-action@v5 diff --git a/package.json b/package.json index 963554914..26aa72add 100644 --- a/package.json +++ b/package.json @@ -3,20 +3,19 @@ "version": "2.0.0", "description": "TrebledJ's personal blog on programming, music, and memes.", "scripts": { - "build-ghpages": "ENVIRONMENT=production npm run build", "debug": "DEBUG=Eleventy* npx @11ty/eleventy", "debugstart": "DEBUG=Eleventy* npx @11ty/eleventy --serve --quiet", "benchmark": "DEBUG=Eleventy:Benchmark* npx @11ty/eleventy", "check-links": "lychee --base https://trebledj.github.io --no-progress --accept '200,201,202,203,204,403,429' --include-verbatim --exclude-mail --exclude-path _site/404.html _site", + "rake": "cd eleventy/detail/rake-js && npm install --ignore-scripts && npm run build", "watch:sass": "sass --watch assets/scss:_site/css --quiet", - "build-dev:sass": "sass assets/scss:_site/css", - "build:sass": "sass --style=compressed assets/scss:_site/css && cleancss --batch --batch-suffix '.min' -O2 _site/css/*.css !_site/css/*.min.css", + "dev:sass": "sass assets/scss:_site/css", + "prod:sass": "sass --style=compressed assets/scss:_site/css && cleancss --batch --batch-suffix '.min' -O2 _site/css/*.css !_site/css/*.min.css", "watch:eleventy": "eleventy --serve --quiet", - "build:eleventy": "eleventy", - "dont-build:rake": "cd eleventy/detail/rake-js && npm install --ignore-scripts && npm run build", - "start": "npm-run-all build-dev:sass --parallel watch:*", - "fast": "ENVIRONMENT=fast npm-run-all build-dev:sass --parallel watch:*", - "build": "npm-run-all --parallel build:*" + "prod:eleventy": "eleventy", + "dev": "npm-run-all dev:sass --parallel watch:*", + "fast": "ENVIRONMENT=fast npm-run-all dev:sass --parallel watch:*", + "prod": "ENVIRONMENT=production npm-run-all --parallel prod:*" }, "repository": { "type": "git",