Skip to content
This repository has been archived by the owner on Jan 28, 2020. It is now read-only.

Commit

Permalink
Removed /node directory, removed symlinks from node_modules
Browse files Browse the repository at this point in the history
  • Loading branch information
George Schneeloch committed Sep 17, 2015
1 parent f3b224d commit f792ce0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 18 deletions.
9 changes: 0 additions & 9 deletions Dockerfile
Expand Up @@ -28,13 +28,6 @@ RUN pip install -r requirements.txt &&\
RUN pip3 install -r requirements.txt &&\
pip3 install -r test_requirements.txt

# Install node development and production packages
RUN mkdir /node
COPY package.json /node/package.json
RUN cd /node &&\
npm install &&\
npm install --production

# Add project
COPY . /src
WORKDIR /src
Expand All @@ -45,8 +38,6 @@ RUN ./manage.py collectstatic --noinput
RUN apt-get clean && apt-get purge
USER mitodl

# Setup node environment
ENV PATH /src/node_modules/.bin:/node/node_modules/.bin:$PATH
# Set pip cache folder, as it is breaking pip when it is on a shared volume
ENV XDG_CACHE_HOME /tmp/.cache

Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Expand Up @@ -19,9 +19,9 @@ web:
build: .
command: >
/bin/bash -c '
sleep 3;
npm install --production;
python manage.py migrate;
sleep 3 &&
npm install --production --no-bin-links &&
python manage.py migrate &&
python manage.py runserver 0.0.0.0:$PORT'
volumes:
- .:/src
Expand Down
5 changes: 4 additions & 1 deletion lore/settings.py
Expand Up @@ -207,7 +207,10 @@ def get_var(name, default):
)
COMPRESS_PRECOMPILERS = (
('text/requirejs', 'requirejs.RequireJSCompiler'),
('text/jsx', 'node_modules/.bin/jsx < {infile} > {outfile}')
(
'text/jsx',
'node node_modules/react-tools/bin/jsx < {infile} > {outfile}'
),
)
COMPRESS_OFFLINE = get_var('LORE_COMPRESS_OFFLINE', False)
COMPRESS_ENABLED = get_var('LORE_COMPRESS_ENABLED', not DEBUG)
Expand Down
10 changes: 5 additions & 5 deletions tox.ini
Expand Up @@ -25,11 +25,11 @@ commands=

[testenv:js]
commands =
npm install --prefix {toxinidir}
{toxinidir}/node_modules/.bin/jshint ui/static/ui/js ui/jstests/
{toxinidir}/node_modules/.bin/jsxhint 'ui/static/ui/js/**/*.jsx' 'ui/jstests/**/*.jsx' --jsx-only
{toxinidir}/node_modules/.bin/jscs ui/static/ui/js ui/jstests/
{toxinidir}/node_modules/.bin/karma start {posargs}
npm install --no-bin-links --prefix {toxinidir}
{toxinidir}/node_modules/jshint/bin/jshint ui/static/ui/js ui/jstests/
{toxinidir}/node_modules/jsxhint/cli.js 'ui/static/ui/js/**/*.jsx' 'ui/jstests/**/*.jsx' --jsx-only
{toxinidir}/node_modules/jscs/bin/jscs ui/static/ui/js ui/jstests/
{toxinidir}/node_modules/karma/bin/karma start {posargs}
{toxinidir}/util/convert_lcov_to_coveralls.js {toxinidir}/coverage/coverage-js.lcov {toxinidir}/coverage/coverage-js.json
cat {toxinidir}/coverage/text-summary.txt

Expand Down

0 comments on commit f792ce0

Please sign in to comment.