# wch-components-bundle

Container project to bundle [WCH](https://www.ibm.com/products/watson-content-hub) data records and UI components as an [npm](http://npmjs.com/) module. Such a module can then be used as a dependency by single page application projects to populate a tenant with data.

## Changes

[CHANGELOG](./CHANGELOG.md)

## Usage

This library is meant to be used in an [Angular](https://angular.io/) based application.

### Use as a template

Use this project as a template for custom bundles.

* Set this as an upstream project, so you can easily consume changes: `git remote add upstream git@github.ibm.com:DX-Components/wch-components-bundle.git`
* Pull changes from upstream `git pull upstream master`

### Deploy the application and WCH artifacts

The library bundles the [WCH](https://www.ibm.com/products/watson-content-hub) content types, layouts and layout mappings. Deploy these artifacts to WCH, e.g. by using the following command of the [CLI](https://www.npmjs.com/package/ibm-wch-sdk-cli):

```bash
ibm-wch-sdk-cli application push --data ./data/ --override --aggregated
```

The `--aggregated` flag makes sure to not only deploy the application data but also the bundled dependencies.

**Note:** In order to successfully execute the command make sure to meet me prerequisites mentioned in the documentation of the [CLI](https://www.npmjs.com/package/ibm-wch-sdk-cli).
