Skip to content

Commit

Permalink
Update r2papi from git, use src from /tmp instead of npm ##r2js
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Jul 1, 2024
1 parent 14b4068 commit 2546059
Show file tree
Hide file tree
Showing 3 changed files with 1,961 additions and 1,606 deletions.
6 changes: 6 additions & 0 deletions shlr/qjs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,12 @@ R2PAPI_FILES+=shell.js
R2PAPI_FILES+=esil.js
R2PAPI_FILES_JS=$(addprefix $(NM)/r2papi/,$(R2PAPI_FILES))

USE_CUSTOM_R2PAPI=1

js_r2papi.c: node_modules
ifeq ($(USE_CUSTOM_R2PAPI),1)
cp /tmp/r2papi.r2.js js_r2papi.qjs
else
# npm i js_r2papi
printf "Using r2papi version: "
-jq .version node_modules/r2papi/package.json
Expand All @@ -80,6 +85,7 @@ js_r2papi.c: node_modules
| grep -v 'r2pipe\.js' \
>> js_r2papi.qjs
echo 'const r2pipe_js_1 = G;' >> js_r2papi.qjs
endif
ifeq ($(USE_MINIFY),1)
npx minify --help > /dev/null npm i minify
npx minify --js < js_r2papi.qjs > js_r2papi.mini.qjs
Expand Down
Loading

0 comments on commit 2546059

Please sign in to comment.