Skip to content

Commit

Permalink
Merge f3f0bbd into 7559d7f
Browse files Browse the repository at this point in the history
  • Loading branch information
encodedBicoding committed Sep 10, 2019
2 parents 7559d7f + f3f0bbd commit d5cf2c2
Show file tree
Hide file tree
Showing 10 changed files with 324 additions and 102 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ script:
- npm run test

after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
- npm run coveralls
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Authors Haven - A Social platform for the creative at heart.

<a href="https://codeclimate.com/github/andela/ah-commando-frontend/test_coverage"><img src="https://api.codeclimate.com/v1/badges/d95f06918a6c2beae060/test_coverage" /></a> [![Build Status](https://travis-ci.org/andela/ah-commando-frontend.svg?branch=develop)](https://travis-ci.org/andela/ah-commando-frontend)
<a href="https://codeclimate.com/github/andela/ah-commando-frontend/test_coverage"><img src="https://api.codeclimate.com/v1/badges/d95f06918a6c2beae060/test_coverage" /></a>
[![Build Status](https://travis-ci.org/andela/ah-commando-frontend.svg?branch=develop)](https://travis-ci.org/andela/ah-commando-frontend)

[![Coverage Status](https://coveralls.io/repos/github/andela/ah-commando-frontend/badge.svg?branch=bg/168380301-fix-env-issues)](https://coveralls.io/github/andela/ah-commando-frontend?branch=bg/168380301-fix-env-issues)
6 changes: 5 additions & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
"name": "ah-commando-frontend",
"description": "Review apps for new PRs to the repo",
"scripts": {},
"env": {},
"env": {
"SECRET_KEY": {
"required": true
}
},
"formation": {},
"addons": [],
"buildpacks": [],
Expand Down
4 changes: 1 addition & 3 deletions build-utils/webpack.dev.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
const { DefinePlugin } = require('webpack');
const { config } = require('dotenv');
const path = require('path');
const Dotenv = require('dotenv-webpack');

const env = config().parsed;
const envKeys = Object.keys(env).reduce((prev, next) => {
prev[`process.env.${next}`] = JSON.stringify(env[next]);
return prev;
}, {});

module.exports = {
mode: 'development',
devtool: 'eval-source-map',
plugins: [
new DefinePlugin(envKeys),
new Dotenv()
],
devServer: {
contentBase: path.resolve(__dirname, 'build'),
port: 9090,
historyApiFallback: true,
},
};

1 change: 1 addition & 0 deletions build-utils/webpack.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module.exports = {
new DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify('production'),
SECRET_KEY: JSON.stringify('herokuIsAnnoying'),
},
}),
],
Expand Down
Loading

0 comments on commit d5cf2c2

Please sign in to comment.