Contribute to jqnpm
This is experimental software, so feedback is most appreciated!
- shUnit2 2.1.x+ in your
$PATH
.
- Run
git clean -idX :/
to clean up any generated file. Use with care. - Create a new
git branch
where you add your changes. - Edit files in
src/
with your code changes.
- Follow current conventions to increase the chance of your patch being accepted.
- Write additional tests in a subfolder to
tests/
.
- Code with tests have a much, much higher chance of being accepted without further fixes.
- If you have changed code in
tests/*/package-source
subfolders, run./tests/create-bundles.sh
to regenerate git.bundle
files for tests. - Run tests with
./tests/all.sh
. - Repeat until your feature is done, well tested and all tests pass.
- Create a pull request based on your new branch.
Set the JQNPM_DEBUG_LEVEL
in your shell to get some debugging output. You can also define it directly on the command line.
JQNPM_DEBUG_LEVEL=4 jqnpm execute
0
fatal1
errors2
warnings3
information4
debug5
verbose6
trace
If you are runnings tests agains plain jq
, it used to be a hassle to replace jqnpm execute
. Now it's easy.
cd tests/
echo 'jq "$@"' >"jq-command-override.sh"
chmod u+x "jq-command-override.sh"
Now you can run ./tests/all.sh
against the jq
binary instead of using the temporary jq
wrapper jqnpm execute
-- it is not to be used once jq
is up to speed.
Remotes and cache can be changed for testing by setting some environment variables in your shell.
Default values
config_default_packagesCache="$HOME/.jq/cache"
config_default_remoteBase="git://github.com"
config_default_remoteSuffix=".git"
Values are used during most tests.
export JQNPM_PACKAGES_CACHE="${BASH_SOURCE%/*}/package-cache"
export JQNPM_REMOTE_BASE="${BASH_SOURCE%/*}/remote-base"
export JQNPM_REMOTE_SUFFIX=".bundle"
This example has been removed in favor of generating a package skeleton with jqnpm generate
. Generate a package and have a look!