Backbase Portal Import CLI tool


2.0.0-alpha.05 years ago6 years agoMinified + gzip package size for @backbase/import in KB


Backbase Import/Export

Warning: this library is still in alpha.

Utilities and CLI for managing import/export of statics & portals.

CLI Commands

bb-import create-collection-zip [-t --target target] [-s --saveAs saveAs]

Create a zip of zips from the collection at located at target, and saves the zip as saveAs.

--target, -t Path to the component sources

--saveAs, -s File to save zip as

bb-import collection-zip [-t --target target]

Imports a zip of zips file into a running portal (configured by .bbrc file).

--target, -t Path to the zip of zips.

bb-import collection [-t --target target]

Imports a collection. Dependencies and sources are located (using @backbase/collection lib) and merged together. Sources with the same name as dependencies will override the dependencies.

bb-import item [-t --target target] [-W --watch watchFlag]

Imports an item into a running portal.

--target, -t Path to the item folder.

--watch, -W Watch flag which enables auto-importing of the item is sources were changed. You will see the log messages when --watch flag is enabled.

Programmtic API



Return an array of items in the sourcesDir that are importable. Finds a sources AND dependencies (using @backbase/collection).

package.packageItemToTmp(item, filename)

Creates a temporary directory and creates a zip called filename based on the item's srcDir. See packageItem.

package.packageItem(item, filename)

Create a package zip called filename (full path to file) based on the item definition. If the item doesn't have a model.xml then a model.xml for a CXP Shared Feature will be automatically created. The model will also have a property automatically created for the item's version.

package.zipZips(zipNames, saveAs)

Takes an array of zip files (paths to zip file) and create a new zip of zips at saveAs.


import.importZipOfZips(bbRestClient, filename)

import.importDirOfZips (bbRestClient, directory)

import.importCollection(bbRestClient, directory)

import.importItem(bbRestClient, item)

import.importPackageZips(bbRestClient, files)

import.importPackageZip(bbRestClient, filename)

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.