diff --git a/index.js b/index.js index 77c7668..5f0240f 100755 --- a/index.js +++ b/index.js @@ -1,3 +1,8 @@ #!/usr/bin/env node -require('babel/register') + +require('babel/register')({ + only: new RegExp(__dirname + '/lib' + '|' + + __dirname + '/node_modules/filepizza') +}) + module.exports = require('./lib/server') diff --git a/lib/components/App.js b/lib/components/App.js index 44512ce..85bb62d 100644 --- a/lib/components/App.js +++ b/lib/components/App.js @@ -12,6 +12,7 @@ ga('send', 'pageview'); export default class App extends React.Component { constructor() { + super() this.state = SupportStore.getState() this._onChange = () => { diff --git a/lib/components/ChromeNotice.js b/lib/components/ChromeNotice.js index fe5d865..692d9c0 100644 --- a/lib/components/ChromeNotice.js +++ b/lib/components/ChromeNotice.js @@ -11,6 +11,7 @@ function getState() { export default class ChromeNotice extends React.Component { constructor() { + super() this.state = getState() this._onChange = () => { diff --git a/lib/components/DownloadPage.js b/lib/components/DownloadPage.js index de693be..a42ac2a 100644 --- a/lib/components/DownloadPage.js +++ b/lib/components/DownloadPage.js @@ -10,6 +10,7 @@ import peer from 'filepizza-peerjs' export default class DownloadPage extends React.Component { constructor() { + super() this.state = DownloadStore.getState() this._onChange = () => { diff --git a/lib/components/DropZone.js b/lib/components/DropZone.js index 32cbb4e..33e3f99 100644 --- a/lib/components/DropZone.js +++ b/lib/components/DropZone.js @@ -3,6 +3,7 @@ import React from 'react' export default class DropZone extends React.Component { constructor() { + super() this.state = { focus: false } } diff --git a/lib/components/ErrorPage.js b/lib/components/ErrorPage.js index f03e1b0..3ec3abc 100644 --- a/lib/components/ErrorPage.js +++ b/lib/components/ErrorPage.js @@ -5,6 +5,7 @@ import Spinner from './Spinner' export default class ErrorPage extends React.Component { constructor() { + super() this.state = ErrorStore.getState() this._onChange = () => { diff --git a/lib/components/UploadPage.js b/lib/components/UploadPage.js index e103fc1..a4da103 100644 --- a/lib/components/UploadPage.js +++ b/lib/components/UploadPage.js @@ -10,6 +10,7 @@ import socket from 'filepizza-socket' export default class UploadPage extends React.Component { constructor() { + super() this.state = UploadStore.getState() this._onChange = () => { diff --git a/package.json b/package.json index 3aea0d7..7ad1bab 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "homepage": "https://github.com/kern/filepizza", "dependencies": { "alt": "^0.14.4", - "babel": "^4.7.16", + "babel": "^5.5.8", "babelify": "^5.0.4", "browserify": "^9.0.3", "browserify-middleware": "^5.0.2", @@ -45,7 +45,5 @@ "node": "0.12.x" }, "preferGlobal": "true", - "bin": { - "filepizza" : "index.js" - } + "bin": "./index.js" }