Upgrade to Babel 6.x
This commit is contained in:
parent
86f23ed1a4
commit
1dbc088d17
13
.babelrc
13
.babelrc
|
@ -1,3 +1,14 @@
|
|||
{
|
||||
"stage": 0
|
||||
"presets": [
|
||||
"es2015",
|
||||
"react"
|
||||
],
|
||||
"env": {
|
||||
"production": {
|
||||
"plugins": [
|
||||
"transform-react-constant-elements",
|
||||
"transform-react-inline-elements"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
15
package.json
15
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",
|
||||
|
|
|
@ -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((
|
||||
<Router history={browserHistory}>
|
||||
<Route path="/*" component={Site} />
|
||||
</Router>
|
||||
), document.getElementById('root'))
|
||||
), document.getElementById('root'));
|
||||
|
|
|
@ -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));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ module.exports = {
|
|||
module: {
|
||||
loaders: [{
|
||||
test: /\.js$/,
|
||||
loaders: ['react-hot', 'babel'],
|
||||
loaders: ['react-hot', 'babel-loader'],
|
||||
include: path.join(__dirname, 'src')
|
||||
}]
|
||||
}
|
||||
|
|
|
@ -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')
|
||||
}]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user