Skip to content

Commit

Permalink
Update dev environment
Browse files Browse the repository at this point in the history
  • Loading branch information
infojunkie committed May 3, 2017
1 parent d01f8fd commit 07338dc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
9 changes: 3 additions & 6 deletions Dockerfile
Expand Up @@ -2,15 +2,12 @@ FROM meedan/ruby
MAINTAINER Meedan <sysops@meedan.com>

# install dependencies
# TODO are these really dependecies for meedan/check-web? these seem like vestiges of meedan/check-api
RUN apt-get update -qq && apt-get install -y imagemagick && rm -rf /var/lib/apt/lists/*

# node modules
COPY package.json /app/package.json
RUN cd /app && npm install

# TODO tempting to have a separate Dockerfile for testing
# this Dockerfile becomes FROM meedan/nodejs and leave the tests in a FROM meedan/ruby based image
ADD package.json /tmp/package.json
RUN cd /tmp && npm install
RUN mkdir -p /app && cp -a /tmp/node_modules /app/

# ruby gems
COPY test/Gemfile test/Gemfile.lock /app/test/
Expand Down
6 changes: 4 additions & 2 deletions docker-entrypoint.sh
@@ -1,3 +1,5 @@
#!/bin/bash

npm run build && npm run publish
if [ ! -d /app/build/web/js ]; then
npm run build;
fi
npm run publish
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -9,8 +9,8 @@
},
"scripts": {
"logo": "cd src/assets/images/logo && ./generate.sh && cd ..",
"style:rtl": "mkdir -p .tmp && node-sass src/app/styles/stylesheet-rtl.scss --output-style=compressed > .tmp/stylesheet-rtl.css.tmp && postcss --use autoprefixer -o build/web/css/stylesheet-rtl.css .tmp/stylesheet-rtl.css.tmp && rm .tmp/stylesheet-rtl.css.tmp",
"style:ltr": "mkdir -p .tmp && node-sass src/app/styles/stylesheet.scss --output-style=compressed > .tmp/stylesheet.css.tmp && postcss --use autoprefixer -o build/web/css/stylesheet.css .tmp/stylesheet.css.tmp && rm .tmp/stylesheet.css.tmp",
"style:rtl": "node-sass src/app/styles/stylesheet-rtl.scss --output-style=compressed > /tmp/stylesheet-rtl.css.tmp && postcss --use autoprefixer -o build/web/css/stylesheet-rtl.css /tmp/stylesheet-rtl.css.tmp",
"style:ltr": "node-sass src/app/styles/stylesheet.scss --output-style=compressed > /tmp/stylesheet.css.tmp && postcss --use autoprefixer -o build/web/css/stylesheet.css /tmp/stylesheet.css.tmp",
"style:all": "npm run style:ltr && npm run style:rtl",
"style:rebuild": "npm rebuild node-sass && mkdir -p build/web/css 2>/dev/null && npm run style:all",
"style:watch:all": "watch 'npm run style:all' ./src/app/styles",
Expand Down

0 comments on commit 07338dc

Please sign in to comment.