Page loader

Hexlet tests and linter status:

Actions Status es-lint Maintainability Test Coverage

Description

Tool for downloading web page to your computer with other files(js, images, css e.t.c) download page as doing this the browser.

Install

Requirements:

  • nodejs lts version >= 14
  • npm
  • make
make install 

or

npm install

Usage

CLI Tool has two arguments url (address of the web page which will be downloaded) and output (the path where will be saved page)

API

arguments:

  • pageUrl - address of the page,
  • outputDir - path for save the web page (default: current working directory),
  • render - module for displaying the status of the downloading each resource(not optional cli-version use module Listr)

return: Promise.resolve(filepath);

import downloadPage from 'page-loader';
 
downloadPage(pageUrl, outputDir, render).then(filepath => )

Example:

asciicast