1.9.1 • Published 5 years ago

cubx-grunt-webpackage-upload v1.9.1

Weekly downloads
7
License
Apache-2.0
Repository
github
Last release
5 years ago

cubx-grunt-webpackage-upload

NPM Version GitHub version

Grunt integration of the cubx-webpackage-uploader.

Getting Started

This plugin requires Grunt ~0.4.5

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install cubx-grunt-webpackage-upload --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('cubx-grunt-webpackage-upload');

The "+webpackage-upload" task

Overview

In your webpackage, the following config is expected to be found in the .webpackage file. If its is not found, it will be created when running the task the first time.

  uploadConfigs: {
    dryRun: {
      url: 'https://cubbles.world/sandbox',
      proxy: '',
      dryRun: true
    },
    release: {
      url: 'https://cubbles.world/sandbox',
      proxy: ''
    }
  }

Options

uploadConfigs.{configName}

Type: string

A key to identify the uploadConfig.

uploadConfigs.{configName}.url

Type: string Default value: 'https://cubbles.world/sandbox'

A url pointing to a named store (here 'sandbox') within a cubbles-base.

uploadConfigs.{configName}.proxy

Type: string Default value: ''

A proxy url, if you are behind a proxy.

uploadConfigs.{configName}.dryRun

Type: boolean Default value: false

Setting the value to true executes the upload procedure (including authentication and permissions check) without any data transfer. The result contains a list of files that would be uploaded - as well as a list of files the will be ignored from an upload. So a dryRun is perfect to check the configuration of your (optional) .cubblesignore file of your webpackage.

uploadConfigs.{configName}.debug

Type: boolean Default value: false

Log into the console on debug -level.

The "_webpackages-bulk-upload" task

Overview

In your projects webpackages directory, a similar config as above is expected to be found in the .workspace file. If its is not found, it will be created when running the task the first time.

Additionaly a list of webpackages to upload can be pre-specified

  "uploadWebpackages": [
      "my-package-one",
      "my-package-two"
    ]

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.