# pkg-js-tools

pkg-js-tools is a collection of tools to aid packaging Node modules in Debian.

## Working with salsa.debian.org repository

To use salsa(1) with pkg-javascript configuration, add something like that in
your .bashrc:

    alias js-salsa='salsa --conf-file +/usr/share/pkg-js-tools/pkg-js-salsa.conf'

Then you can use salsa simply. Some examples:

* if you created a local repo and want to create and push it on
https://salsa.debian.org/js-team, launch simply:

    js-salsa push_repo .

* to configure a repo already pushed:

    js-salsa update_safe node-foobar

* to clone locally a js-team package:

    js-salsa co node-foobar

See salsa(1) for more.

## Debhelper addon

If you use pkg-js-autopkgtest, you can also use the same test during build.
Example:

* debian/control

```
...
Testsuite: autopkgtest-nodejs
Build-Depends: pkg-js-tools
...
```

* debian/rules

```
#!/usr/bin/make -f
# -*- makefile -*-

%:
        dh $@ --with nodejs
```

* debian/tests/pkg-js/test

```shell
mocha -R spec
```

See also [pkg-js-autopkgtest README](../autopkgtest/README.md).

## Other tools

* github-debian-upstream: launch it in source repo to create a
debian/upstream/metadata _(works only if upstream repo is on GitHub)_

