Skip to content
A repo for migrating dockstore-ui from AngularJS to Angular2 and implementing search
Branch: develop
Clone or download
agduncan94 Feature/use new service endpoints (#698)
* use userServices to grab services

* use new config githubAppUrl
Latest commit 1119565 Jul 11, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
cypress
e2e Feature/update copyright (#98) Oct 10, 2017
images
scripts Feature/713/services (#672) Jun 14, 2019
src Feature/use new service endpoints (#698) Jul 11, 2019
travisci Feature/update webservice testing (#690) Jul 4, 2019
.codecov.yml Feature/1435/commit (#317) Jun 22, 2018
.editorconfig
.gitignore Feature/2348/aws logs (#643) May 29, 2019
.nvmrc Feature/preinstall (#601) Apr 12, 2019
.prettierrc Feature/2130/prettier (#683) Jun 24, 2019
LICENSE Document Changes Apr 25, 2017
README.md
angular.json Feature/2157/service files (#689) Jul 11, 2019
cypress.json
git.version.ts Feature/preinstall (#601) Apr 12, 2019
karma.conf.js Feature/angular6 upgrade (#289) May 18, 2018
package-lock.json npm i @types/node@10.14.0 (#692) Jul 8, 2019
package.json
protractor.conf.js
proxy.conf.json Feature/2386/config (#628) May 20, 2019
swagger-config.json Change to Angular 7 even though nothing changes Nov 5, 2018
tsconfig.json Feature/713/services (#672) Jun 14, 2019
tslint.json
webpack.config.js Feature/npm updates (#624) Apr 17, 2019

README.md

Codacy Badge Build Status codecov

Please file issues for this repository and Web site at the ga4gh/dockstore repository!

Table of Contents

Dockstore UI2

This project was generated with Angular CLI version 1.0.0-rc.4.

Set Up Angular CLI

Prerequisites

  • Java 8+
  • Node and its included NPM (see .nvmrc for the correct version of node to install)
  • wget

Install NPM and Node using nvm:

wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash

Close current terminal and open a new one or source ~/.bashrc

nvm install 10.13.0

Optionally, install a global Angular CLI in order to execute ng commands without prepending npx.
Otherwise, prepend npx to every command in this README if a global @angular/cli was not installed. Before installing, follow https://docs.npmjs.com/getting-started/fixing-npm-permissions#option-two-change-npms-default-directory to fix permissions if needed.

$npm i -g @angular/cli@1.3.1		

NPM

After cloning the repo from GitHub, you can install the npm packages.

git clone https://github.com/dockstore/dockstore-ui2.git
cd dockstore-ui2
git checkout develop
git pull

npm ci

npm ci will install all npm dependencies including Prettier and the Husky Git hook. Ensure CI=true is not set when using npm ci or else the Git hook will not work. Prettier + Husky will automatically format changed files before each commit:

$ git commit -m "Test"
ghusky > pre-commit (node v10.13.0)
  ↓ Stashing changes... [skipped]
    → No partially staged files found...
  ✔ Running linters...
[feature/2130/prettier b6da3e7c] Test

Check to make sure Angular CLI has been properly set up

$ ng v
    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/
@angular/cli: 1.3.1
node: 7.9.0
os: linux x64
@angular/animations: 4.3.6
@angular/common: 4.3.6
@angular/compiler: 4.3.6
@angular/core: 4.3.6
@angular/flex-layout: 2.0.0-beta.9
@angular/forms: 4.3.6
@angular/http: 4.3.6
@angular/platform-browser: 4.3.6
@angular/platform-browser-dynamic: 4.3.6
@angular/router: 4.3.6
@angular/cli: 1.3.1
@angular/compiler-cli: 4.3.6
@angular/language-service: 4.3.6

If you wish to serve the dist folder in a VM, make sure you have nginx and security rules set up properly. Nginx

Project Set Up

The Dockstore class in src/app/shared/dockstore.model.ts is for integrating supported services.

In dockstore-webservice, the dockstore.yml being served must be edited to include the client IDs.

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files. Run ng serve --host 0.0.0.0 in order to serve your site to other computers on the same network.

Updating dependencies

Run npm update. This will automatically update package.json and package-lock.json.

Code scaffolding

Run ng g component component-name to generate a new component. You can also use ng generate directive/pipe/service/class/module. See https://github.com/datorama/akita-schematics#create-a-new-feature for how to generate Akita-related components.

Build

Optionally override the webservice version using npm config set dockstore-ui2:webservice_version ${WEBSERVICE_VERSION} Run npm run build to build the project. The build artifacts will be stored in the dist/ directory. Use the npm run build.prod for a production build.

Running unit tests

Run ng test to execute the unit tests via Karma.

Running end-to-end tests

Cypress is no longer specified in the package.json, check the .circleci/config.yml for the version and how to install it.

Run $(npm bin)/cypress open or $(npm bin)/cypress run to execute the end-to-end tests via Cypress.io. Before running the tests make sure you:

  • have a postgresql database
  • serve the app via ng serve or similar.
  • have the Dockstore webservice jar in the root directory and run it (see scripts/run-webservice-script.sh for guideline)

Documentation Generation

This should eventually be done automatically on the master branch and have GitHub pages point to the docs folder. To manually run it:

npm install -g @compodoc/compodoc
npm run compodoc

Then open docs/index.html with browser

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.

You can’t perform that action at this time.