Skip to content

fabric8-analytics/fabric8-analytics-dependency-editor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fabric8 Analytics Dependency Editor

Semantic Release

Fabric8 Analytics Dependency Editor is a stack analysis feature.

Build

Pre-requisites

  • node v8.9.1+ (required by angular-cli 6+)

  • npm 5.5.1

This angular library is built using angular-cli's workspace. As with workspace we got 2 package.json files:

  • the root one is used to build the demo app and contains all dev dependencies used to build.

  • the library one used as template for publishing the lib to npmjs.org

The main application is the demo app. The library source is under [/projects/fabric8-analytics-dependency-editor](/projects/fabric8-analytics-dependency-editor).

Build

npm install
npm run build

to build and run both demo and lib.

Running the demo

Set-up env

To target PROD env in your demo app, go to src/environments/environment.ts

export const environment = {
  production: false,
  ANALYTICS_RECOMMENDER_URL: 'https://recommender.api.openshift.io/',
  ANALYTICS_LICENSE_URL: 'https://license-analysis.api.openshift.io/',
  OSIO_AUTH_TOKEN: 'OSIO_AUTH_TOKEN'
};

To get OSIO-TOKEN follow below steps :

  1. Login to OSIO

  2. Go to profile view

  3. Edit Profile

  4. Copy token

  5. Set env variable export OSIO-TOKEN = "token fetched in step 4"

Start demo

npm install
npm run build
npm start

Before Commiting your changes, make sure to clean your environment

npm run clean:env

others

Here are some of the most useful/frequently used scripts you may need to run:

Scipt Command Description

Lint

$ npm run lint

Runs the TypeScript and Angular 2 linter

Unit Tests

$ npm run test:lib:dev

Runs the unit tests in watch mode

Release

$ npm run build

The created library will be placed in dist.

Important
You shouldn’t ever publish the build manually, instead you should let the CD pipeline do a semantic release.

Contributing to the app

The development guide is part of the contributors' instructions. Please check it out in order to contribute to this project.