Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make scratch-run much faster #2

Merged
merged 15 commits into from
Jan 5, 2024
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: build/*.zip
path: bin/*.zip
- name: Upload to Release
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/*.zip
file: bin/*.zip
tag: ${{ github.ref }}
file_glob: true
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
build
bin
dist
9 changes: 5 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
NODE_VERSION=16.16.0

VERSION=$(node -p -e "require('./package.json').version")
BUILD_CMD="npx pkg index.js --no-bytecode --public-packages \"*\" --public"
BUILD_CMD="npx pkg ../dist/index.js"

rm -rf build && mkdir build && cd build
rm -rf bin dist
npx webpack

npx ncc build ../index.js --minify --out .
echo "(()=>require(\"text-encoding\"))();" >> index.js # Hack to force inclusion of text-encoding
mkdir bin
cd bin

# Linux amd64
$BUILD_CMD -t node"$NODE_VERSION"-linux-x64 --out-path linux-amd64
Expand Down
225 changes: 0 additions & 225 deletions index.js

This file was deleted.

Loading