Skip to content

Commit

Permalink
v2.0.0-rc.3 (#85)
Browse files Browse the repository at this point in the history
* fix(output): fix generator logic in `src/config.js` template - #84
* fix(README): coverage icon now points to correct link (icon and URL)
  • Loading branch information
prescottprue authored Feb 9, 2018
1 parent 908f75a commit 76e7dd0
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,8 @@ MIT © [Scott Prue](http://prue.io)
[daviddm-url]: https://david-dm.org/prescottprue/generator-react-firebase
[climate-image]: https://img.shields.io/codeclimate/github/prescottprue/generator-react-firebase.svg?style=flat-square
[climate-url]: https://codeclimate.com/github/prescottprue/generator-react-firebase
[coverage-image]: https://img.shields.io/codeclimate/coverage/github/prescottprue/generator-react-firebase.svg?style=flat-square
[coverage-url]: https://codeclimate.com/github/prescottprue/generator-react-firebase
[coverage-image]: https://img.shields.io/codecov/c/github/prescottprue/generator-react-firebase.svg?style=flat-square
[coverage-url]: https://codecov.io/gh/prescottprue/generator-react-firebase
[license-image]: https://img.shields.io/npm/l/generator-react-firebase.svg?style=flat-square
[license-url]: https://github.com/prescottprue/generator-react-firebase/blob/master/LICENSE
[code-style-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default compose(
}
]),
spinnerWhileLoading(['firestore']),
// // Map projects from state to props
// Map projects from state to props
connect(({ firestore: { data } }, { params }) => ({
project: getVal(data, `projects/${params.projectname}`)
})),
Expand Down
2 changes: 1 addition & 1 deletion generators/app/templates/src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const firebase = {
export const reduxFirebase = {
userProfile: 'users', // root that user profiles are written to
enableLogging: false, // enable/disable Firebase Database Logging<% if (includeRedux && includeFirestore) { %>
useFirestoreForProfile: <% if (includeRedux && includeFirestore) { %>true<% } %><% if (includeRedux && includeFirestore) { %>false<% } %>, // Save profile to Firestore instead of Real Time Database<% } %>
useFirestoreForProfile: <% if (includeRedux && includeFirestore) { %>true<% } %><% if (includeRedux && !includeFirestore) { %>false<% } %>, // Save profile to Firestore instead of Real Time Database<% } %>
// updateProfileOnLogin: false // enable/disable updating of profile on login
// profileDecorator: (userData) => ({ email: userData.email }) // customize format of user profile
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { compose } from 'redux'
import { connect } from 'react-redux'
<% if (includeRedux && includeFirestore) { %>import { firestoreConnect, getVal } from 'react-redux-firebase'<% } %><% if (!includeFirestore) { %>import { firebaseConnect, getVal } from 'react-redux-firebase'<% } %>
<% if (includeRedux && includeFirestore) { %>import { firestoreConnect, getVal } from 'react-redux-firebase'<% } %><% if (includeRedux && !includeFirestore) { %>import { firebaseConnect, getVal } from 'react-redux-firebase'<% } %>
import { spinnerWhileLoading } from 'utils/components'
import { UserIsAuthenticated } from 'utils/router'

export default compose(
// redirect to /login if user is not logged in
UserIsAuthenticated,<% if (includeFirestore) { %>
UserIsAuthenticated,<% if (includeRedux && includeFirestore) { %>
// Map auth uid from state to props
connect(({ firebase: { auth: { uid } } }) => ({ uid })),
// Wait for uid to exist before going further
Expand All @@ -20,8 +20,8 @@ export default compose(
}
]),
spinnerWhileLoading(['firestore']),
// // Map projects from state to props
connect(({ firestore: { data } }, { params }) => ({<% } %><% if (!includeFirestore) { %>
// Map projects from state to props
connect(({ firestore: { data } }, { params }) => ({<% } %><% if (includeRedux && !includeFirestore) { %>
firebaseConnect(({ params }) => [{ path: `projects/${params.projectname}` }]),
connect(({ firebase: { data } }, { params }) => ({<% } %>
project: getVal(data, `projects/${params.projectname}`)
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "generator-react-firebase",
"version": "2.0.0-rc.2",
"version": "2.0.0-rc.3",
"description": "Starter that uses React and Firebase (with option for Redux)",
"main": "generators/index.js",
"scripts": {
Expand Down
1 change: 0 additions & 1 deletion test/unit/app.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ describe('generator-react-firebase:app', function () {
})

describe('redux option', () => {

describe('include', () => {
before(() =>
helpers.run(path.join(__dirname, '../../generators/app'))
Expand Down

0 comments on commit 76e7dd0

Please sign in to comment.