open-index/open-npm huggingface dataset:
npm package: @ngageoint/seed-images
Description: Angular component for Seed image discovery
Author: Applied Information Sciences
Latest version: 5.0.1

# Seed Images
An Angular component for [Seed](https://ngageoint.github.io/seed/) image discovery

## Install
`npm install --save seed-images`

## Dependencies
* Angular
* [PrimeNG](https://www.primefaces.org/primeng/)
* [Font Awesome](http://fontawesome.io)
* [ClipboardJS](https://clipboardjs.com/)
* [JS-Beautify](https://github.com/beautify-web/js-beautify)
* [Lodash](https://lodash.com)

## 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](https://github.com/ngageoint/seed-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](https://docs.npmjs.com/creating-a-new-npm-user-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`