Skip to content

Commit

Permalink
Improving heroku deploys fixes #37 (#43)
Browse files Browse the repository at this point in the history
* fix lint errors
* move favicons-webpack-plugin to dependencies
* add engines entry to package.json
* adjust start and deploy npm scripts for heroku
* add npm version in package.json
* update babel path

Closes #37
  • Loading branch information
kkostov authored and lvarayut committed Sep 17, 2016
1 parent 53da61a commit 87a70a5
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Procfile
@@ -1 +1 @@
web: npm run deploy
web: node ./lib/index.js
2 changes: 1 addition & 1 deletion client/components/Feature/FeatureComponent.js
Expand Up @@ -15,7 +15,7 @@ export default class Feature extends React.Component {
<div>
<Page heading='Integrated with'>
<Grid>
{this.props.viewer.features.edges.map(edge => {
{this.props.viewer.features.edges.map((edge) => {
const imageUrl = require(`../../assets/${edge.node.name.toLowerCase()}.png`);
return (
<Cell col={4} key={edge.node.id}>
Expand Down
2 changes: 1 addition & 1 deletion client/routes/ViewerQuery.js
@@ -1,7 +1,7 @@
import Relay from 'react-relay';

export default {
viewer: (Component) => Relay.QL`
viewer: Component => Relay.QL`
query {
viewer {
${Component.getFragment('viewer')}
Expand Down
15 changes: 10 additions & 5 deletions package.json
Expand Up @@ -3,16 +3,21 @@
"version": "1.0.0",
"description": "Relay Starter Kit - Integrated with Relay, GraphQL, Express, ES6/ES7, JSX, Webpack, Babel, Material Design Lite, and PostCSS",
"scripts": {
"start": "nodemon --watch server/data/**/*.js --exec \"npm run update && babel-node server/index.js\"",
"update": "babel-node server/utils/updateSchema.js",
"deploy": "cross-env NODE_ENV=production webpack --config webpack.config.js && npm run update && cross-env NODE_ENV=production babel-node server/index.js",
"lint": "eslint --ignore-path .gitignore client server"
"start": "nodemon --watch server/data/**/*.js --exec \"npm run update && ./node_modules/.bin/babel-node server/index.js\"",
"update": "./node_modules/.bin/babel-node server/utils/updateSchema.js",
"deploy": "cross-env NODE_ENV=production webpack --config webpack.config.js && npm run update && cross-env NODE_ENV=production ./node_modules/.bin/babel-node server/index.js",
"lint": "eslint --ignore-path .gitignore client server",
"heroku-postbuild": "cross-env NODE_ENV=production webpack --config webpack.config.js && cross-env NODE_ENV=production ./node_modules/.bin/babel ./server --out-dir ./lib"
},
"pre-commit": "lint",
"repository": {
"type": "git",
"url": "git+https://github.com/lvarayut/relay-fullstack.git"
},
"engines": {
"node": "6.6.0",
"npm": "3.10.8"
},
"keywords": [
"react",
"relay",
Expand Down Expand Up @@ -40,7 +45,6 @@
"eslint-plugin-import": "^1.14.0",
"eslint-plugin-jsx-a11y": "^2.2.1",
"eslint-plugin-react": "^6.2.0",
"favicons-webpack-plugin": "0.0.7",
"nodemon": "^1.10.2",
"pre-commit": "^1.1.3",
"react-transform-catch-errors": "^1.0.2",
Expand All @@ -64,6 +68,7 @@
"css-loader": "^0.25.0",
"express": "^4.14.0",
"express-graphql": "^0.5.4",
"favicons-webpack-plugin": "0.0.7",
"file-loader": "^0.9.0",
"graphql": "^0.7.0",
"graphql-relay": "^0.4.3",
Expand Down

0 comments on commit 87a70a5

Please sign in to comment.