Skip to content

Commit

Permalink
V1.0.2 (#23)
Browse files Browse the repository at this point in the history
* Fixes lodash plugin and favicon not found issues mentioned in #22
* Default application name changed
* Adds Unit tests for all components
* Path constants used in `Navbar`
* `auth` used in place of `account` in `Navbar`
* Travis config updated to include caching `node_modules`
  • Loading branch information
prescottprue authored Nov 15, 2016
2 parents a3afaab + ecb6d6c commit 2d6d338
Show file tree
Hide file tree
Showing 96 changed files with 1,019 additions and 298 deletions.
15 changes: 12 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,24 @@ branches:
only:
- master

script:
- npm run test
cache:
bundler: true
directories:
- node_modules # NPM packages

notifications:
email:
on_failure: change
on_success: change

script:
- npm run test:cov

addons:
code_climate:
repo_token: $CODE_CLIMATE

after_success:
- npm install -g codeclimate-test-reporter
- codeclimate-test-reporter < coverage/*/lcov.info
- codeclimate-test-reporter < coverage/lcov.info
- npm run codecov
10 changes: 5 additions & 5 deletions examples/react-firebase-redux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,12 @@ Build code before deployment by running `npm run build`. There are multiple opti

[npm-image]: https://img.shields.io/npm/v/react-firebase-redux.svg?style=flat-square
[npm-url]: https://npmjs.org/package/react-firebase-redux
[travis-image]: https://img.shields.io/travis/prescottprue/react-firebase-redux/master.svg?style=flat-square
[travis-url]: https://travis-ci.org/prescottprue/react-firebase-redux
[daviddm-image]: https://img.shields.io/david/prescottprue/react-firebase-redux.svg?style=flat-square
[daviddm-url]: https://david-dm.org/prescottprue/react-firebase-redux
[travis-image]: https://img.shields.io/travis/testuser/react-firebase-redux/master.svg?style=flat-square
[travis-url]: https://travis-ci.org/testuser/react-firebase-redux
[daviddm-image]: https://img.shields.io/david/testuser/react-firebase-redux.svg?style=flat-square
[daviddm-url]: https://david-dm.org/testuser/react-firebase-redux

[license-image]: https://img.shields.io/npm/l/react-firebase-redux.svg?style=flat-square
[license-url]: https://github.com/prescottprue/react-firebase-redux/blob/master/LICENSE
[license-url]: https://github.com/testuser/react-firebase-redux/blob/master/LICENSE
[code-style-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square
[code-style-url]: http://standardjs.com/
1 change: 0 additions & 1 deletion examples/react-firebase-redux/build/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ const deployToFirebase = (cb) => {
if (error !== null) {
if (cb) {
cb(error, null)
console.log('error deploying', error)
return
}
}
Expand Down
4 changes: 2 additions & 2 deletions examples/react-firebase-redux/build/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ webpackConfig.plugins = [
new HtmlWebpackPlugin({
template : paths.client('index.html'),
hash : false,
favicon : paths.client('static/favicon.ico'),
// favicon : paths.client('static/favicon.ico'), // for including single favicon
filename : 'index.html',
inject : 'body',
minify : {
Expand Down Expand Up @@ -219,7 +219,7 @@ webpackConfig.module.loaders.push(
// when we don't know the public path (we know it only when HMR is enabled [in development]) we
// need to use the extractTextPlugin to fix this issue:
// http://stackoverflow.com/questions/34133808/webpack-ots-parsing-error-loading-fonts/34133809#34133809
if (!__DEV__) {
if (!__DEV__ && !__TEST__) {
debug('Apply ExtractTextPlugin to CSS loaders.')
webpackConfig.module.loaders.filter((loader) =>
loader.loaders && loader.loaders.find((name) => /css/.test(name.split('?')[0]))
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

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

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

81 changes: 0 additions & 81 deletions examples/react-firebase-redux/dist/app.4da229b5056f9fec9a3c.js

This file was deleted.

81 changes: 81 additions & 0 deletions examples/react-firebase-redux/dist/app.e79a9d879071d061109e.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/react-firebase-redux/dist/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>react-firebase-redux</title><link rel="shortcut icon" href="/favicon.ico"><link href="/app.ad9b08128faa4dc1cc217aa79759e539.css" rel="stylesheet"></head><body><div id="root" style="height: 100%"></div><script type="text/javascript" src="/vendor.c40303bb23a7d3ee04b3.js"></script><script type="text/javascript" src="/app.4da229b5056f9fec9a3c.js"></script></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>react-firebase-redux</title><link href="/app.ad9b08128faa4dc1cc217aa79759e539.css" rel="stylesheet"></head><body><div id="root" style="height: 100%"></div><script type="text/javascript" src="/vendor.9c9a6e8e6f10a065cde3.js"></script><script type="text/javascript" src="/app.e79a9d879071d061109e.js"></script></body></html>

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions examples/react-firebase-redux/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,12 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/prescottprue/react-firebase-redux.git"
"url": "git+https://github.com/testuser/react-firebase-redux.git"
},
"author": "prescottprue (https://github.com/prescottprue)",
"author": "testuser (https://github.com/testuser)",
"license": "MIT",
"dependencies": {
"lodash": "^4.16.6",
"material-ui": "0.16.0",
"normalize.css": "^4.1.1",
"react": "^15.0.0",
Expand All @@ -102,11 +103,12 @@
"babel-core": "^6.17.0",
"babel-eslint": "^6.0.4",
"babel-loader": "^6.2.5",
"babel-plugin-transform-runtime": "^6.15.0",
"babel-preset-es2015": "^6.14.0",
"babel-plugin-lodash": "^3.2.9",
"babel-preset-react": "^6.11.1",
"babel-preset-stage-0": "^6.3.13",
"babel-plugin-istanbul": "^2.0.1",
"babel-plugin-transform-runtime": "^6.15.0",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-polyfill": "^6.16.0",
"babel-runtime": "^6.11.6",
Expand Down
1 change: 1 addition & 0 deletions examples/react-firebase-redux/src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export const firebase = {
databaseURL: 'https://redux-firebasev3.firebaseio.com',
storageBucket: 'redux-firebasev3.appspot.com'
}

// Config for react-redux-firebase
// For more details, visit https://prescottprue.gitbooks.io/react-redux-firebase/content/config.html
export const reduxFirebase = {
Expand Down
27 changes: 17 additions & 10 deletions examples/react-firebase-redux/src/containers/Navbar/Navbar.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import React, { Component, PropTypes } from 'react'
import classes from './Navbar.scss'
import { Link } from 'react-router'
import { LIST_PATH, ACCOUNT_PATH } from 'constants/paths'
import {
LIST_PATH,
ACCOUNT_PATH,
LOGIN_PATH,
SIGNUP_PATH
} from 'constants/paths'

// Components
import AppBar from 'material-ui/AppBar'
import IconMenu from 'material-ui/IconMenu'
Expand Down Expand Up @@ -30,6 +36,7 @@ const { pathToJS } = helpers
@connect(
({firebase}) => ({
authError: pathToJS(firebase, 'authError'),
auth: pathToJS(firebase, 'auth'),
account: pathToJS(firebase, 'profile')
})
)
Expand All @@ -39,7 +46,7 @@ export default class Navbar extends Component {
}

static propTypes = {
account: PropTypes.object,
auth: PropTypes.object,
firebase: PropTypes.object.isRequired
}

Expand All @@ -49,25 +56,25 @@ export default class Navbar extends Component {
}

render () {
const { account } = this.props
const { auth } = this.props

const iconButton = (
<IconButton iconStyle={avatarStyles.icon} style={avatarStyles.button}>
<Avatar
src={account && account.avatarUrl ? account.avatarUrl : StockPhoto}
src={auth && auth.photoURL ? auth.photoURL : StockPhoto}
/>
</IconButton>
)

const mainMenu = (
<div className={classes['menu']}>
<Link to='/signup'>
<Link to={SIGNUP_PATH}>
<FlatButton
label='Sign Up'
style={buttonStyle}
/>
</Link>
<Link to='/login'>
<Link to={LOGIN_PATH}>
<FlatButton
label='Login'
style={buttonStyle}
Expand All @@ -76,7 +83,7 @@ export default class Navbar extends Component {
</div>
)

const rightMenu = account && account.email ? (
const rightMenu = auth ? (
<IconMenu
iconButtonElement={iconButton}
targetOrigin={{ horizontal: 'right', vertical: 'bottom' }}
Expand All @@ -91,16 +98,16 @@ export default class Navbar extends Component {
<MenuItem
primaryText='Sign out'
value='logout'
onClick={this.handleLogout}
onTouchTap={this.handleLogout}
/>
</IconMenu>
) : mainMenu

// Only apply styling if avatar is showing
const menuStyle = account && account.email && avatarStyles.wrapper
const menuStyle = auth ? avatarStyles.wrapper : {}

// Redirect to projects page if logged in
const brandPath = account && account.email ? `/${LIST_PATH}` : '/'
const brandPath = auth ? `/${LIST_PATH}` : '/'

return (
<AppBar
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import AccountForm from './AccountForm'

export default AccountForm
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import ProviderDataForm from './ProviderDataForm'

export default ProviderDataForm
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Home from './Home'

export default Home
2 changes: 1 addition & 1 deletion examples/react-firebase-redux/src/routes/Home/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Home from './components/Home/Home'
import Home from './components/Home'

// Sync route definition
export default {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import LoginForm from './LoginForm'

export default LoginForm
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import NewProjectDialog from './NewProjectDialog'

export default NewProjectDialog
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import NewProjectTile from './NewProjectTile'

export default NewProjectTile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import ProjectTile from './ProjectTile'

export default ProjectTile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import SignupForm from './SignupForm'

export default SignupForm
Loading

0 comments on commit 2d6d338

Please sign in to comment.