arikon/npm2debian — Issue #16: Proposal: generic debian/watch
Author: kapouer
Created: 2012-02-18 19:56:38+00:00
State: open

Here's the one from npm package i use :

./debian/watch :

version=3
opts=downloadurlmangle=s/.*v(.*)/http\:\/\/registry\.npmjs\.org\/npm\/-\/xxxxxx\-$1\.tgz/,\
filenamemangle=s/.*v(.*)$/xxxxxx-$1\.tar\.gz/ \
https://github.com/toto/xxxxxx/tags .*/tarball/v([\d.-]+)

You can see it checks new version on github (because i do not know how to find new version on npm website),
and the github link could be found in the "repository.url" of package.json.
The download link is simply the one from npm website, to ensure the published npm package is used, not the github
version (they can differ sometimes).