diff --git a/.babelrc b/.babelrc index 12606a3a96..3554dc78e4 100644 --- a/.babelrc +++ b/.babelrc @@ -1,3 +1,4 @@ { - "stage": 0 + "presets": ["es2015", "react", "stage-0"], + "plugins": ["babel-plugin-add-module-exports"] } diff --git a/client/index.js b/client/index.js index 5089d27322..7f14635285 100644 --- a/client/index.js +++ b/client/index.js @@ -8,7 +8,7 @@ import { createLocation, createHistory } from 'history'; import { hydrate } from 'thundercats'; import { render$ } from 'thundercats-react'; -import { app$ } from '../common/app'; +import app$ from '../common/app'; import historySaga from './history-saga'; import errSaga from './err-saga'; diff --git a/common/app/App.jsx b/common/app/App.jsx index 6099540c7d..e3c3fa1f72 100644 --- a/common/app/App.jsx +++ b/common/app/App.jsx @@ -3,7 +3,7 @@ import { Row } from 'react-bootstrap'; import { ToastMessage, ToastContainer } from 'react-toastr'; import { contain } from 'thundercats-react'; -import { Nav } from './components/Nav'; +import Nav from './components/Nav'; const toastMessageFactory = React.createFactory(ToastMessage.animation); diff --git a/common/app/Cat.js b/common/app/Cat.js index 47b31bad6e..8673cb2d8a 100644 --- a/common/app/Cat.js +++ b/common/app/Cat.js @@ -4,8 +4,8 @@ import { Disposable, Observable } from 'rx'; import { post$, postJSON$ } from '../utils/ajax-stream.js'; import { AppActions, AppStore } from './flux'; -import { HikesActions } from './routes/Hikes/flux'; -import { JobActions } from './routes/Jobs/flux'; +import HikesActions from './routes/Hikes/flux'; +import JobActions from './routes/Jobs/flux'; const ajaxStamp = stamp({ methods: { diff --git a/common/app/components/Footer/index.js b/common/app/components/Footer/index.js index c50e0cda87..07d4704d78 100644 --- a/common/app/components/Footer/index.js +++ b/common/app/components/Footer/index.js @@ -1 +1 @@ -export { default as Footer } from './Footer.jsx'; +export default from './Footer.jsx'; diff --git a/common/app/components/Nav/index.js b/common/app/components/Nav/index.js index d04d01f62d..0d1bcba7c2 100644 --- a/common/app/components/Nav/index.js +++ b/common/app/components/Nav/index.js @@ -1 +1 @@ -export { default as Nav } from './Nav.jsx'; +export default from './Nav.jsx'; diff --git a/common/app/index.js b/common/app/index.js index c55039fe05..99924acf83 100644 --- a/common/app/index.js +++ b/common/app/index.js @@ -1 +1 @@ -export { default as app$ } from './app-stream.jsx'; +export default from './app-stream.jsx'; diff --git a/common/app/routes/Hikes/flux/index.js b/common/app/routes/Hikes/flux/index.js index 336f72d297..0936f320ae 100644 --- a/common/app/routes/Hikes/flux/index.js +++ b/common/app/routes/Hikes/flux/index.js @@ -1 +1 @@ -export { default as HikesActions } from './Actions'; +export default from './Actions'; diff --git a/common/app/routes/Jobs/flux/index.js b/common/app/routes/Jobs/flux/index.js index 61944c2666..0936f320ae 100644 --- a/common/app/routes/Jobs/flux/index.js +++ b/common/app/routes/Jobs/flux/index.js @@ -1 +1 @@ -export { default as JobActions } from './Actions'; +export default from './Actions'; diff --git a/package.json b/package.json index b82351af60..28aacc9470 100644 --- a/package.json +++ b/package.json @@ -27,10 +27,14 @@ "dependencies": { "accepts": "^1.3.0", "async": "^1.5.0", - "babel": "5.8.34", - "babel-core": "5.8.34", + "babel-cli": "^6.3.17", + "babel-core": "^6.3.26", "babel-eslint": "^4.1.4", - "babel-loader": "5.4.0", + "babel-loader": "^6.2.1", + "babel-plugin-add-module-exports": "^0.1.2", + "babel-preset-es2015": "^6.3.13", + "babel-preset-react": "^6.3.13", + "babel-preset-stage-0": "^6.3.13", "body-parser": "^1.13.2", "chai-jquery": "^2.0.0", "cheerio": "~0.19.0", @@ -58,7 +62,7 @@ "forever": "~0.15.1", "frameguard": "~0.2.2", "gulp": "^3.9.0", - "gulp-babel": "^5.3.0", + "gulp-babel": "^6.1.1", "gulp-concat": "^2.6.0", "gulp-eslint": "^1.1.0", "gulp-inject": "^3.0.0", diff --git a/server/boot/a-react.js b/server/boot/a-react.js index 5f094fe973..41f7f7fe15 100644 --- a/server/boot/a-react.js +++ b/server/boot/a-react.js @@ -6,7 +6,7 @@ import debugFactory from 'debug'; import { dehydrate } from 'thundercats'; import { renderToString$ } from 'thundercats-react'; -import { app$ } from '../../common/app'; +import app$ from '../../common/app'; const debug = debugFactory('freecc:react-server');