Disable minify to get smaller diffs and save space

Due to a limitation in ncc, the js files contain CRLF line endings
which are then converted by git.
This commit is contained in:
Leonard Brünings 2022-05-25 15:19:33 +02:00 committed by Daz DeBoer
parent 26ea4afa08
commit 544da49fda
No known key found for this signature in database
GPG Key ID: DD6B9F0B06683D5D
6 changed files with 131095 additions and 39 deletions

View File

@ -15,10 +15,19 @@ jobs:
run: |
npm install
npm run all
- name: Check for uncommitted changes
# Ensure no changes, but ignore node_modules dir since dev/fresh ci deps installed.
- name: Compare the expected and actual dist/ directories
run: |
git diff --exit-code --stat -- . ':!node_modules' \
|| (echo "##[error] found changed files after build. please 'npm run all'" \
"and check in all changes" \
&& exit 1)
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff
exit 1
fi
id: diff
# If index.js was different than expected, upload the expected version as an artifact
- uses: actions/upload-artifact@v2
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
with:
name: dist
path: dist/

66216
dist/main/index.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

64891
dist/post/index.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -8,7 +8,7 @@
"format": "prettier --write **/*.ts",
"format-check": "prettier --check **/*.ts",
"lint": "eslint src/**/*.ts",
"build": "ncc build src/main.ts --out dist/main --source-map --minify && ncc build src/post.ts --out dist/post --source-map --minify",
"build": "ncc build src/main.ts --out dist/main --source-map && ncc build src/post.ts --out dist/post --source-map",
"test": "jest",
"all": "npm run format && npm run lint && npm run build && npm test"
},