diff --git a/Makefile b/Makefile new file mode 100644 index 00000000000..55dd9e26d8f --- /dev/null +++ b/Makefile @@ -0,0 +1,19 @@ +GRUNT_DOCKER_NAME:=galaxy/client-builder:16.01 + +all: + @echo "This makefile is primarily used for building Galaxy's JS client. A sensible all target is not yet implemented." + +npm-deps: + cd client && npm install + +grunt: npm-deps + cd client && grunt + +grunt-docker-image: + docker build -t ${GRUNT_DOCKER_NAME} client + +grunt-docker: grunt-docker-image + docker run -it -v `pwd`:/data ${GRUNT_DOCKER_NAME} + +clean-grunt-docker-image: + docker rmi ${GRUNT_DOCKER_NAME} diff --git a/client/.docker-build.sh b/client/.docker-build.sh new file mode 100755 index 00000000000..7452b63adac --- /dev/null +++ b/client/.docker-build.sh @@ -0,0 +1,4 @@ +#!/bin/bash +cd /data/client && \ + npm install && \ + grunt diff --git a/client/Dockerfile b/client/Dockerfile new file mode 100644 index 00000000000..ad1a9c5884a --- /dev/null +++ b/client/Dockerfile @@ -0,0 +1,13 @@ +FROM digitallyseamless/nodejs-bower-grunt +RUN mkdir /gx + +COPY package.json /gx/package.json + +RUN cd /gx && \ + npm install -g && \ + cd / && \ + rm -rf /gx + +WORKDIR /data/client +ADD ./.docker-build.sh /build.sh +CMD ["/build.sh"] diff --git a/doc/source/dev/faq.rst b/doc/source/dev/faq.rst index e60a0a9eea8..7139678c0a3 100644 --- a/doc/source/dev/faq.rst +++ b/doc/source/dev/faq.rst @@ -10,3 +10,16 @@ to provide relatively concrete answers for specific Galaxy development scenarios This can be done with either IPython/Jupyter or a plain python console, depending on your preferences:: python -i scripts/db_shell.py + +... build Galaxy Javascript frontend client? +-------------------------------------------- + +We've added a makefile which will let you do this. If you have nodejs and npm installed, you can simple run:: + + make grunt + +If you prefer docker and aren't a JS developer primarily, you can run + + make grunt-docker + +