How to install all the required modules for mwhtmldumper.js a single command? (node.js)

Help
Dmitriy
2013-09-27
2013-09-27
  • Dmitriy

    Dmitriy - 2013-09-27

    For a new tool(mwhtmldumper.js) to create ZIM-files you need to install all the necessary modules for node.js. Now it takes about 10 modules.
    Is there a way to immediately see which modules required for this javascipt file?

     
  • Dmitriy

    Dmitriy - 2013-09-27

    myself ask, myself answer :)

    grep require mwhtmldumper.js

    var fs = require( 'fs' );
    var domino = require( 'domino' );
    var jsdom = require( 'jsdom' );
    var async = require( 'async' );
    var http = require( 'follow-redirects' ).http;
    var httpsync = require( 'httpsync' );
    var swig = require( 'swig' );
    var urlParser = require( 'url' );
    var pathParser = require( 'path' );
    var sleep = require( 'sleep' );
    var pngquant = require( 'pngquant' );
    var pngcrush = require( 'pngcrush' );
    var jpegtran = require( 'jpegtran' );
    var htmlminifier = require('html-minifier');
    var smooth = require('smooth')(maxParallelRequests);

    nmp install fs domino jsdom async follow-redirects swig url path sleep pngquant pngcrush jpegtran html-minifier smooth

     


Anonymous

Cancel  Add attachments