# agri-portal

> Informa Agri Web Portal

Latest version **1.0.0** (published 2018-03-19) · 0 weekly downloads

## Install

```sh
npm install agri-portal
pnpm add agri-portal
yarn add agri-portal
bun add agri-portal
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; large bundle.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2018-03-19 |
| First published | 2018-03-19 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 17.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| Maintainers | agridevelopers |

## Links

- npm: https://www.npmjs.com/package/agri-portal
- Repository: https://github.com/informa-agra/portal-web
- Homepage: http://informa-agri-labs.com/
- Issues: https://github.com/informa-agra/portal-web/issues
- npm.io page: https://npm.io/package/agri-portal

## Dependencies (1)

- [aurelia-dialog](https://npm.io/package/aurelia-dialog.md) ^1.0.0-rc.2.0.0

## Recent versions

- 1.0.0 (latest) — 2018-03-19

## README

# Informa Agri Portal App

## [Dev Environment Setup](https://github.com/informa-agra/portal-web/blob/master/dev-environment-setup.md)

## Installation

Ensure that [NodeJS](http://nodejs.org/) is installed.

Install the dependencies from the project root `/src/Informa.Agri.Portal.App`:

```shell
npm install
npm install -g gulp jspm
```

Install the client-side dependencies with jspm:

```shell
jspm install -y
```

> **Note:** jspm queries GitHub to install semver packages, but GitHub has a rate limit on anonymous API requests. It is advised that you configure jspm with your GitHub credentials in order to avoid problems. You can do this by executing `jspm registry config github` and following the prompts. If you choose to authorize jspm by an access token instead of giving your password (see GitHub `Settings > Personal Access Tokens`), `public_repo` access for the token is required.

>**Note:** Windows users, if you experience an error of "unknown command unzip" you can solve this problem by doing `npm install -g unzip` and then re-running `jspm install`.

## Running the App

  ```shell
  gulp watch
  ```

Browse to [http://localhost:9000](http://localhost:9000) to see the app. You can make changes in the code found under `src` and the browser should auto-refresh itself as you save files.

> The Skeleton App uses [BrowserSync](http://www.browsersync.io/) for automated page refreshes on code/markup changes concurrently across multiple browsers. If you prefer to disable the mirroring feature set the [ghostMode option](http://www.browsersync.io/docs/options/#option-ghostMode) to false

## API config

If you do not have the `identity-server-web` app running locally you can update the paths to the API in `config/config.json` from `.local` to `.com` e.g.

`https://identity.dev.informa-agri-labs.local/connect/authorize`

Becomes

`https://identity.dev.informa-agri-labs.com/connect/authorize`

You should then be able to login with:

**email**: richard.lee@informa.com
**password**: informa-ee

## Bundling

Bundling is performed by [Aurelia Bundler](http://github.com/aurelia/bundler). A gulp task is already configured for that. Use the following command to bundle the app:

  ```shell
    gulp bundle
  ```

You can also unbundle using the command bellow:

  ```shell
    gulp unbundle
  ```

To start the bundled app, execute the following command:

  ```shell
    gulp serve-bundle
  ```

#### Configuration

The configuration is done by ```bundles.js``` file.

##### Optional

Under ```options``` of ```dist/aurelia``` add ```rev: true``` to add bundle file revision/version.

## Running The Unit Tests

To run the unit tests, first ensure that you have followed the steps above in order to install all dependencies and successfully build the library. Once you have done that, proceed with these additional steps:

1. Ensure that the [Karma](http://karma-runner.github.io/) CLI is installed. If you need to install it, use the following command:

  ```shell
  npm install -g karma-cli
  ```
2. Install Aurelia libs for test visibility:

  ```shell
  jspm install aurelia-framework
  jspm install aurelia-http-client
  jspm install aurelia-router
  ```
3. You can now run the tests with this command:

  ```shell
  karma start
  ```

## Running The E2E Tests
Integration tests are performed with [Protractor](http://angular.github.io/protractor/#/).

1. Place your E2E-Tests into the folder ```test/e2e/src```
2. Install the necessary webdriver

  ```shell
  gulp webdriver-update
  ```

3. Configure the path to the webdriver by opening the file ```protractor.conf.js``` and adjusting the ```seleniumServerJar``` property. Typically its only needed to adjust the version number.

4. Make sure your app runs and is accessible

  ```shell
  gulp watch
  ```

5. In another console run the E2E-Tests

  ```shell
  gulp e2e
  ```

## Exporting bundled production version

A gulp task is already configured for that. Use the following command to export the app:

  ```shell
    gulp export
  ```
The app will be exported into ```export``` directory preserving the directory structure.

#### Configuration

The configuration is done by ```bundles.js``` file.
In addition, ```export.js``` file is available for including individual files.


## Exporting the agri-tables package

### Build

```shell
cd ./src/exports/agri-tables

npm install

gulp build
```

### Publish

```shell
gulp bump-version

npm login
```
Username: agridevelopers
Password: Informa123
Email: andy.winter@informa.com

```shell
npm publish
```

### Reset

Clean the `node_modules` and `dist` folders so that they don't interfere with running the portal.

```
gulp reset
```

## Run as Fertecon site

```
gulp watch --app fertecon
```

---
_Source: https://npm.io/package/agri-portal · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
