- Some form of http server, webroot set to
./dist/buildand directory index set to
build.html(created after running
- Install Node.js and npm for your platform.
Linux: use the system package manager
Windows: install from:
- Node.js download page
- (or install with conda:
conda install nodejs)
OS-X: install via conda, or another source (homebrew, etc.)
(npm should be installed with node)
- Install the yarn npm manager:
npm install -g yarn
- Install the JS dependencies: From the
webgnomeclientrepository root, run the following:
To update dependencies in the future, run
yarn install again.
- Install grunt:
npm install -g grunt
- To run a develop server, run:
NOTE: for a deployed server, you will want to run
grunt build and use a production web server.
Installs all of the applications dependencies described in
grunt less:compile connect:start watch:css. Sets up a working development environment by compiling less files, starting a http server, and setting up a watch task for the less to recompile on change.
Builds a compiled version of the application into a single index.html file (marginally supported currently, still has a few external image and font dependancies that are relatively pathed) located in
Simpler version of
grunt build, sets up the applcation for requirejs based dynamic builds.
Starts a http server on port 8080 for serving dynamic builds.
Generate JSDoc based documentation. Located in
Runs jshint over application source files
Runs jshint over application source files, followed by a series of selenium tests. (Only works if you have a working client on your system running at
grunt testbut only runs use case specific demo tests.
NOTE: this may not be up to date.
This set of commands will set up and run the whole thing (from the CI configuration)
(In a Dockerfile)
RUN cd /webgnomeclient && npm install && npm install -g grunt
Installs the needed npm packages listed in package.json and installs the grunt package globally so that it can be used as a command (something that can't be done with the local dependency list in package.json)
RUN cd /webgnomeclient && grunt install
Runs the grunt install command that's configured in gruntfile.js
RUN cp /webgnomeclient/config-example.json /config/config.json
Copies the example config file to the config directory and renames it. /config is noted as a docker volume so that when running the container you can provide your own config instead if the default isn't what you want.
RUN ln -s /config/config.json /webgnomeclient/config.json
This symlink is so that the replaceable (through a docker volume) config file can be used by the application.