You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don’t use JSDelta very often, so when I do have need for it I generally have to puzzle out how to get it do do what I want again. I'm therefore opening this issue to serve as a collection of recipes for using JSDelta in different situations.
The text was updated successfully, but these errors were encountered:
Produce a minimal test case from a Node.js project
predicate.sh:
#!/bin/bashcd$(dirname $1)# enter directory containing project
yarn install ||exit 1 # Install dependencies, or abort with irrelevant error
yarn run some-command # The actual command under test
rm -rf node_modules/ # Delete dependencies (otherwise jsdelta tries to minimize them, too)
and to run it:
# Copy git repo, but strip git data so jsdelta doesn't spend time on it
git clone . /tmp/jsdelta-start
rm -rf /tmp/jsdelta-start/.git
# Run the minimization (note: I don't understand what the `package.json` arg does but this seems to work fine regardless)# --msg works regardless of whether output is on stdout or stderr
yarn run jsdelta --cmd predicate.sh --msg 'error message goes here' --dir /tmp/jsdelta-start/ package.json
I don’t use JSDelta very often, so when I do have need for it I generally have to puzzle out how to get it do do what I want again. I'm therefore opening this issue to serve as a collection of recipes for using JSDelta in different situations.
The text was updated successfully, but these errors were encountered: