Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix webpack close #369 #371

Merged
merged 5 commits into from
Feb 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ RUN npm install
COPY . /code
RUN npm run build

CMD ["node", "./bin/server"]
CMD ["node", "-r", "babel-register", "./server"]

EXPOSE 5001 3030
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

.icon-payment-recurring,
.icon-payment-unique {
background: 50% 50% url('../../images/donation-recurring.png') transparent no-repeat;
background: 50% 50% url('./../../images/donation-recurring.png') transparent no-repeat;
background-size: contain;
width: 2.2rem;
height: 2.2rem;
Expand All @@ -20,7 +20,7 @@

}
.icon-payment-unique {
background-image: url('../../images/donation-unique.png');
background-image: url('./../../images/donation-unique.png');
}


Expand Down
21 changes: 10 additions & 11 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ volumes:
# development image build process:
app-gems:
driver: local
node-modules:
driver: local

services:
# Our PostgreSQL service:
Expand All @@ -21,14 +23,7 @@ services:
# our database IDEs with it:
- 5432:5432
volumes:
# Mount the DB dumps folder into the container, to be able to create & access database dumps:
- ./db/dumps:/db/dumps:Z
# Mount out tmp folder, we might want to have access to something there during development:
- ./tmp:/tmp:Z
# Mount our 'restoredb' script:
- ./bin/restoredb:/bin/restoredb:ro
# Mount our 'dumpdb' script:
- ./bin/dumpdb:/bin/dumpdb:ro
- ./bin/init.sql:/docker-entrypoint-initdb.d/init.sql
# We'll mount the 'postgres-data' volume into the location Postgres stores it's data:
- postgres-data:/var/lib/postgresql/data
environment:
Expand Down Expand Up @@ -111,7 +106,8 @@ services:
# command: rails server -p 3000 -b 0.0.0.0
ports:
- "3000:3000" # Bind our host's port 3000 to the app port 3000:

env_file:
- ../bonde-server/.env
# App Guard: Keeps running tests on a separate process:
test:
# We'll copy from &app_base, and override:
Expand All @@ -128,12 +124,15 @@ services:
client:
depends_on:
- api
command: ./node_modules/.bin/nodemon -r 'babel-register' ./server --watch ./server --watch ./tests/server
volumes:
- ./:/code:Z
- node-modules:/code/node_modules
ports:
- "3001:3001"
build: .
- "3002:3002"
build:
context: .
dockerfile: Dockerfile.dev
restart: always
links:
- api:api.bonde.devel
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"description": "Universal JS app",
"scripts": {
"test": "BABEL_DISABLE_CACHE=1 ./node_modules/.bin/jest --config ./tools/jest.config.json --runInBand",
"test": "BABEL_DISABLE_CACHE=1 node --max_old_space_size=2048 ./node_modules/.bin/jest --config ./tools/jest.config.json --maxWorkers=2",
"test:a": "BABEL_DISABLE_CACHE=1 ./node_modules/.bin/jest --config ./tools/jest.config.json",
"test:w": "yarn test:a -- --watch",
"coverage": "nyc npm test",
Expand Down
8 changes: 7 additions & 1 deletion tools/webpack.client.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,13 @@ module.exports = {
{
test: /\.(scss|sass)$/,
loader: ExtractTextPlugin.extract('style-loader', ['css-loader?sourceMap', 'postcss-loader?parser=postcss-scss', 'sass-loader?sourceMap'])
}
},
{
test: /\.(png|otf.*|eot.*|ttf.*|woff.*|woff2.*)$/,
loader: 'file?name=[path][sha512:hash:base64:7].[ext]'
},
{ test: /\.svg/, loader: 'svg-url' }

]
}
}
7 changes: 6 additions & 1 deletion tools/webpack.server.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ module.exports = {
{
test: /\.(scss|sass)$/,
loader: ExtractTextPlugin.extract('style-loader', ['css-loader?sourceMap', 'postcss-loader?parser=postcss-scss', 'sass-loader?sourceMap'])
}
},
{
test: /\.(png|otf.*|eot.*|ttf.*|woff.*|woff2.*)$/,
loader: 'file?name=[path][sha512:hash:base64:7].[ext]'
},
{ test: /\.svg/, loader: 'svg-url' }
]
},
postcss: function() {
Expand Down