@cubbles/webpackage-uploader

0.1.11 • Public • Published

cubx-webpackage-uploader

NPM Version GitHub version

This lib is part of the Cubbles platform. Use this lib to upload webpackages from Client to Base.

Install

$ npm install -g cubx-webpackage-uploader

API

var uploader = require('cubx-webpackage-uploader')();
var uploaderConfig = {
    source: '/packages/my-package1',
    target: {
        url: 'http://boot2docker.me',
        proxy: ''
    },
    debug: false
};
}
uploader.uploadSingleWebpackage(uploaderConfig, function(err, success) {
    if (err) {
        console.error(err.message);
    } else {
        console.log(success);
    }
});

CLI

Configuration

You can pass the config via config.json -File

Config structure:

# config.json
{
    source: '/packages/my-package1',
    target: {
        url: 'http://cubbles.url',
        proxy: ''
    },
    debug: false,
    dryRun: false
};
  • source: {string-path} (default == '.') Points to the folder containing the webpackage.
  • target.url: {string-url} (default == https://www.cubbles.world/sandbox) Url of the Base you want to upload your webpackage to.
  • target.proxy: {string-url} (default == '') (optional) Proxy-Url, if your are behind a proxy.
  • debug: {boolean} (default == false) (optional) logs debug information;
  • dryRun: {boolean} (default == false) (optional) prevents uploader from doing the upload, responds a list of files to be uploaded AND a list of file to be ignored from upload according to a (optional) '.cubblesignore' config file

Ignore resources from upload '.cubblesignore'

At the root folder of a webpackage developers can (optionally) provide a file name .cubblesignore. As you know it from .gitignore, developers can define the resources to be ignored from being uploaded using glob-patterns (@see https://github.com/isaacs/node-glob#glob-primer).

Run (standalone)

    upload-webpackage ./path/to/config.json

Readme

Keywords

none

Package Sidebar

Install

npm i @cubbles/webpackage-uploader

Weekly Downloads

11

Version

0.1.11

License

ISC

Unpacked Size

26 kB

Total Files

6

Last publish

Collaborators

  • edwingamboa
  • hrbu
  • jtrs
  • pwr