cubx-webpackage-downloader
v1.0.0
Published
Downloads a list of cubbles webpackages
Downloads
1
Maintainers
Readme
cubx-webpackage-downloader
Module for downloading a list of webpackages.
Usage:
Command line:
cubx-webpackage-downloader -o <outputDirectory> -w <webpackagesIds> -b <baseUrl>
Parameters
-o
or--outputDirectory
: local target directory for downloaded webpackage-w
orwebpackagesIds
: list of webpackages to be requested. Can be:- Comma-separated list of webpackages
- a reference to a .json file with a list of webpackages
- inline JSON list of webpackages
-b
or--baseUrl
: base URL to use
Other npm modules
let baseUrl = 'http://base.example';
let outputDirectory = 'path/to/my/local/directory';
let listOfWebpackages = [
"[email protected]",
"[email protected]"
];
let WebpackageDownloader = require('cubx-webpackage-downloader');
let webpackageDownloader = new WebpackageDownloader();
webpackageDownloader.downloadWebpackages(listOfWebpackages, outputDirectory, baseUrl)
.then(function () {
console.log('Webpackages were downloaded successfully at', options.outputDirectory);
})
.catch(function (error) {
console.error('The webpackages could not be downloaded.', error);
});