diff --git a/.babelrc b/.babelrc index ce840ab..f77a5ac 100644 --- a/.babelrc +++ b/.babelrc @@ -1,3 +1,14 @@ { - "stage": 0 -} \ No newline at end of file + "presets": [ + "es2015", + "react" + ], + "env": { + "production": { + "plugins": [ + "transform-react-constant-elements", + "transform-react-inline-elements" + ] + } + } +} diff --git a/package.json b/package.json index 4f10589..d43e402 100644 --- a/package.json +++ b/package.json @@ -3,8 +3,8 @@ "version": "1.0.0", "description": "Send browser notifications from your terminal. No installation. No registration.", "repository": { - "type" : "git", - "url" : "https://github.com/tannercollin/Notica" + "type": "git", + "url": "https://github.com/tannercollin/Notica" }, "scripts": { "dev": "node serverdev.js", @@ -15,9 +15,16 @@ "author": "Tanner Collin (http://github.com/tannercollin)", "license": "MIT", "devDependencies": { - "babel-core": "^5.4.7", + "babel-core": "^6.21.0", "babel-eslint": "^3.1.9", - "babel-loader": "^5.1.2", + "babel-loader": "^6.2.10", + "babel-plugin-transform-react-constant-elements": "^6.9.1", + "babel-plugin-transform-react-inline-elements": "^6.8.0", + "babel-preset-es2015": "^6.18.0", + "babel-preset-es2016": "^6.16.0", + "babel-preset-es2017": "^6.16.0", + "babel-preset-latest": "^6.16.0", + "babel-preset-react": "^6.16.0", "eslint-plugin-react": "^2.3.0", "react-hot-loader": "^1.2.7", "webpack": "^1.9.6", diff --git a/src/index.js b/src/index.js index 4048058..77c1c4e 100644 --- a/src/index.js +++ b/src/index.js @@ -1,9 +1,9 @@ -import React from 'react' -import { Router, Route, browserHistory } from 'react-router' +import React from 'react'; +import { Router, Route, browserHistory } from 'react-router'; import Site from './ui/Site'; React.render(( -), document.getElementById('root')) +), document.getElementById('root')); diff --git a/src/ui/Home.js b/src/ui/Home.js index e33c9f2..e3a79ec 100644 --- a/src/ui/Home.js +++ b/src/ui/Home.js @@ -77,7 +77,7 @@ export default class Home extends React.Component { } catch (e) { // If we are on a browser without serviceWorker this.setState({registration: false}); } - }.bind(this)); + }); } } diff --git a/webpack.config.js b/webpack.config.js index ffc2eb7..6fecb8c 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -23,7 +23,7 @@ module.exports = { module: { loaders: [{ test: /\.js$/, - loaders: ['react-hot', 'babel'], + loaders: ['react-hot', 'babel-loader'], include: path.join(__dirname, 'src') }] } diff --git a/webpack.production.config.js b/webpack.production.config.js index ff64663..f3e6edb 100644 --- a/webpack.production.config.js +++ b/webpack.production.config.js @@ -13,22 +13,22 @@ module.exports = { }, plugins: [ new webpack.HotModuleReplacementPlugin(), - new webpack.optimize.UglifyJsPlugin({ - compress: { - warnings: false - } - }), new webpack.DefinePlugin({ 'process.env': { 'NODE_ENV': JSON.stringify('production') } }), + new webpack.optimize.UglifyJsPlugin({ + compress: { + warnings: false + } + }), new webpack.NoErrorsPlugin() ], module: { loaders: [{ test: /\.js$/, - loaders: ['babel'], + loaders: ['babel-loader'], include: path.join(__dirname, 'src') }] }