Upload a Webpackage
Last updated
Last updated
As a coder, you can develop and test your webpackage(s) locally using the CDT (Coder DevTools). If you want to provide it for a larger audience, you should upload it. That is, to transfer all files of a webpackage folder into a selected store of a Cubbles Base instance.
Details for the upload of a webpackage are set using the uploadConfigs
Object in the .webpackage file within the root folder of each webpackage.
Initially, the .webpackage file doesn't contain any configuration. Just run +webpackage-upload
the grunt task:
Now you see the .webpackage file containing an "uploadConfigs" object with 2 example configurations. Just rename/adapt them to your needs. You can define as many configurations as you like. The configuration object has the following properties:
url [mandatory, string/url]
: This is the url of the Cubbles Base where the webpackage will be uploaded to.
proxy [optional, string/url]
: If your connection to the Cubbles Base is routed over a proxy server, use this attribute to provide the proxy url.
dryRun [optional, boolean]
: This option allows you to run the task, without actually uploading anything. It's perfect to check your store permissions or your .cubblesignore
configuration.
debug [optional, boolean]
: Set the debug option to "true" to print more details.
Some real examples of that file are available at com.incowia.lib.chart-library and cubx-maps
After running the +webpackage-upload
again, you will be able to select one of the defined configurations as follows:
The .cubblesignore
file allows you to prevent individually defined files and folders from upload. Internally we use the glob package - so just read the glob-primer for supported patterns.
Uploading a webpackage into a server-side store requires your account to have appropriate permissions.
You can easily check your current permissions for 1..n stores via curl:
The response contains an access token. Just use JWT to decode it and look at the permissions property to see for which of the passed stores you have rights for, as presented below:
To perform an upload, you should:
run the grunt task +webpackage-upload
choose the configuration to be used
provide provide your credentials
Then your webpackage is released and all components are ready to be used. Use the artifact search of the store you uploaded into to see each artifact of your webpackage listed. Gor instance, the url for the "sandbox" store is: https://cubbles.world/sandbox/cubx.core.artifactsearch@1.6.1/artifactsearch/index.html. Cubbles stores looks as presented below: