@ngageoint/seed-images
TypeScript icon, indicating that this package has built-in type declarations

5.0.1 • Public • Published

Seed Images

An Angular component for Seed image discovery

Install

npm install --save seed-images

Dependencies

Environment

The seed-images component expects two environment properties to be set:

  • scale: In order for the component to properly display either the seed manifest JSON or a Scale import button, a scale property must be set in the project's environment object. The value should be true if seed-images is being used within a Scale UI.
  • siloUrl: The URL of a valid SILO instance.

How to use

  • Import into app module: import { SeedImagesModule } from 'seed-images';
  • environment (required): reference to an Angular environment object (see above).
  • imageImport: event emitted when the "Import" button is clicked. Its payload is the image manifest JSON.

environments/environment.ts

export const environment = {
  production: false,
  scale: false,
  siloUrl: 'http://mySiloApi.com'
};

environments/environment.prod.ts

export const environment = {
  production: true,
  scale: false,
  siloUrl: 'http://mySiloApi.com'
};

app.component.ts

import { Component } from '@angular/core';
import { environment } from '../environments/environment';
...
export class AppComponent {
  env = environment;
  constructor() {}

  // method to handle image import if scale environment var is true
  onImageImport(image) {
    console.log(image.job, image.manifest);
  }
  ...
}

app.component.html

<seed-images [environment]="env"></seed-images>

or, if scale: true

<seed-images [environment]="env" (imageImport)="onImageImport($event)"></seed-images>

Release and Publish to NPM

  • Login to NPM with a valid NPM account
  • Commit any relevant changes
  • Execute npm run release to cut a new version
  • Update package-dist.json file with current version information
  • Execute npm run build to compile app
  • Inside the dist directory, execute npm publish
  • Execute git push --follow-tags origin master

/@ngageoint/seed-images/

    Package Sidebar

    Install

    npm i @ngageoint/seed-images

    Weekly Downloads

    1

    Version

    5.0.1

    License

    Apache-2.0

    Unpacked Size

    204 kB

    Total Files

    24

    Last publish

    Collaborators

    • joshnels
    • restjohn
    • kgilland
    • danielbarela
    • ngageoint-npm
    • gisjedi
    • caldwellc
    • rachelais
    • mheppner
    • schmidtk