How To Change Exisiting
A quick summary of How To Change Exisiting
Change existing product/application
Examples below use the lineage application but can be use for any existing Phovea application
There are two ways to set up an existing Phovea App
- Create a new directory (this will avoid dependency conflicts with other tools), clone one ore more app repositories, create a workspace, install and run the application from the workspace
- Clone an app repository, install, build (optional), and run according to the instruction in the repo readme
The first approach (creating a workspace) is particularly useful when developing multiple plugins, as all the projects within the workspace will share a common npm installation and Docker setup.
git clone https://github.com/Caleydo/lineage.git(and/or) clone any other repos that you will need).
- Create workspace
- Install dependencies
- Run application
npm run start:lineage
- Open browser and navigate to
Your directory structure (for one or more projects) will look like this:
workspace --> has the helper/docker files but is not attached to any repo \- repo1 --> cloned from github \- repo2 --> cloned from github
If you have several repos in your workspace, you can run:
- forEach git pull or
- forEach git push
to update all the repos in your workspace.
Direct, non-workspace, Approach
$ git clone https://github.com/Caleydo/lineage.git $ cd lineage $ npm install
$ npm run build
The build process is optional because it is not required in order to run the application (e.g. during testing/development).
The build process itself includes:
- running all unit tests -> karma
- checking code quality -> tslint
npm run start
npm run build,
npm run start will just build the application in memory without any tests or code quality checks
The need for import and export is because with TypeScript (and ES6 in general) you cannot use the global scope and every file has his own scope. You need to declare what variables and functions should be exported/imported. Follow the links to learn more about export and import.
Now that you have successfully (hopefully) cloned and examined an existing application, you are ready to build your own application!