Skip to content

Commit

Permalink
[111] Update travis.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
notmarkmiranda committed Feb 18, 2019
1 parent 245827a commit b9bbc4f
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 26 deletions.
28 changes: 10 additions & 18 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,26 +1,18 @@
{
"presets": [
[
"env",
{
"modules": false,
"targets": {
"browsers": "> 1%",
"uglify": true
},
"useBuiltIns": true
}
],
"react"
["env", {
"modules": false,
"targets": {
"browsers": "> 1%",
"uglify": true
},
"useBuiltIns": true
}]
],

"plugins": [
"syntax-dynamic-import",
"transform-object-rest-spread",
[
"transform-class-properties",
{
"spec": true
}
]
["transform-class-properties", { "spec": true }]
]
}
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ env:
- DB=postgresql
script:
- RAILS_ENV=test bundle exec rake db:create db:migrate --trace
- RAILS_ENV=test bundle exec rails webpacker:compile
- bundle exec rspec
before_install:
- export TZ=US/Mountain
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ def navbar_props
},
userAttributes: {
currentUserEmail: current_user&.email,
notificationCount: current_user.unread_notifications_count,
lastFiveNotifications: current_user.last_five_notifications.as_json
notificationCount: current_user&.unread_notifications_count,
lastFiveNotifications: current_user&.last_five_notifications.as_json || 0
},
isLoggedIn: current_user.present?
}
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/components/NavBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import PropTypes from 'prop-types'
import UserNav from './UserNav'

class NavBar extends Component {
constructor
render () {
const { isLoggedIn, userAttributes, routes } = this.props.attributes
const { rootPath } = routes
console.log(userAttributes);
return (
<nav className="navbar navbar-expand-lg navbar-light bg-light">
<div className="container">
Expand Down
4 changes: 0 additions & 4 deletions app/javascript/packs/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,3 @@
// layout file, like app/views/layouts/application.html.erb

console.log('Hello World from Webpacker')
// Support component names relative to this directory:
var componentRequireContext = require.context("components", true)
var ReactRailsUJS = require("react_ujs")
ReactRailsUJS.useContext(componentRequireContext)
1 change: 0 additions & 1 deletion config/webpacker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ default: &default
cache_manifest: false

extensions:
- .jsx
- .js
- .sass
- .scss
Expand Down

0 comments on commit b9bbc4f

Please sign in to comment.