Differences between revisions 12 and 13
Revision 12 as of 2017-12-01 08:35:23
Size: 2203
Editor: Praveen A
Comment:
Revision 13 as of 2017-12-14 16:38:17
Size: 2405
Editor: Praveen A
Comment:
Deletions are marked like this. Additions are marked like this.
Line 29: Line 29:
 * grunt package has a patch to load global modules, see node-fuzzaldrin-plus for an example. See node-jquery for handling cases using load-grunt-tasks module is used to load plugins mentioned in package.json automatically (symlink global tasks to node_modules in debian/rules). TODO: make it load global modules by default without patching Gruntfile.js. See [[grunt]] for more details.  * grunt package has a patch to load global modules, see [[https://anonscm.debian.org/cgit/pkg-javascript/node-fuzzaldrin-plus.git/tree/debian/patches/use-global-tasks.patch|node-fuzzaldrin-plus]] for an example. See [[https://anonscm.debian.org/cgit/collab-maint/node-jquery.git/tree/debian/rules|node-jquery]] for handling cases using load-grunt-tasks module is used to load plugins mentioned in package.json automatically (symlink global tasks to node_modules in debian/rules). TODO: make it load global modules by default without patching Gruntfile.js. See [[grunt]] for more details.

Node.js

Node.js is a platform built on Chrome's JavaScript runtime for easy building of fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.

Packaging modules

On Debian systems up to and including Stretch (Debian 9), Node.js modules are located in:

/usr/lib/nodejs/<module_name>

For Debian Buster (to become Debian 10), Node.js modules are now located in:

/usr/lib/node/<module_name>

For more information about packaging a node module for Debian (and the reasons for the change of location for nodejs modules) please take a look at these pages:

  • npm2deb: an automatic tool to easily and quickly deploy debian packages starting from npm information

  • manual: an overview about best practice and policies in packaging nodejs modules in debian systems

Complex modules

For complex modules, which have many dependencies to be satisfied, you may want to track your work in this wiki in order to keep javascript team updated about.

For more information, please take a look at Tasks page.

Using build tools like grunt

  • grunt package has a patch to load global modules, see node-fuzzaldrin-plus for an example. See node-jquery for handling cases using load-grunt-tasks module is used to load plugins mentioned in package.json automatically (symlink global tasks to node_modules in debian/rules). TODO: make it load global modules by default without patching Gruntfile.js. See ?grunt for more details.

  • gulp package has a patch to load global modules by default. Just call gulp in override_dh_auto_build in debian/rules. TODO: make debhelper autodetect grunt and gulp.
  • babeljs command is provided by node-babel-cli. See node-d3-color for an example of using babel.
  • webpack package needs using a webpack.config.js to resolve global modules, see gitlab and node-d3-zoom for config files
  • browserify and rollup can be replaced by webpack