node.js is required to build the viewer.
-
First install NVM (node version manager) per the instructions here:
-
Install a recent version of Node.js if you haven't already done so:
nvm install stable -
Install the dependencies required by this project:
(From within this directory)
npm iAlso re-run this any time the dependencies listed in package.json may have changed, such as after checking out a different revision or pulling changes.
-
To run a local server for development purposes:
npm run dev-serverThis will start a server on http://localhost:8080.
-
To build the static version:
npm run buildAfter the build process, the frontend files are in
/dist/devfolder.
-
First you need to make sure that you have access to
activebrainatlas.ucsd.edu. -
Build the viewer:
npm run build -
Replace the contents in
activebrainatlas.ucsd.edu:/var/www/html/ngwith the contents in/dist/dev
-
All changes that are made in the existing files need to be wrapped by
/* START OF CHANGE: YOUR COMMENTS */and/* END OF CHANGE: YOUR COMMENTS */ -
Try to make use the existing functionalities/functions/codes as much as possible and write fewer codes to achieve new functionalities.
-
Recommended IDE: Webstorm.