This document is still work in progress.

Please check the mailing list archives for the latest discussions about it.

Debian JavaScript Policy

This page describes the policy that packages with Javascript libraries should follow.

Package naming

Given a foo library, packages must be named according to the following rules:

Please remember that it's preferable if you name the repository after the source package name (i.e. foo.js.git for foo.js and node-foo.git for node-foo). This isn't a hard requirement though.

Paths

libjs-foo

The scripts should be installed to /usr/share/javascript/foo/.

node-foo

The scripts should be installed to /usr/lib/nodejs/ or /usr/lib/nodejs/foo/. The choice depends whether the module is contained in a single file or in multiple files. In case the latter is true, please refer to the upstream documentation (also available in /usr/share/doc/nodejs/api/modules.html#folders_as_Modules) to understand how to correctly make it available to the NodeJS framework.

Binary rename of node to nodejs

The program name "node" is conflicting with another package. Technical committee decided to fix this by renaming node to nodejs. To comply to this, it is often as simple as :

Some programs are a bit less obvious to fix, for example they can spawn nodejs instances using "node" name.