diff --git a/package.json b/package.json index 0a998dc03..c6cae6225 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ }, "devDependencies": { "babel-eslint": "7.0.0", + "babel-plugin-resolver": "1.1.0", "babel-preset-react-native": "1.9.0", "babel-register": "6.16.3", "eslint": "3.7.1", @@ -26,13 +27,16 @@ }, "scripts": { "check": "eslint --ext \".jsx\" --ignore-pattern node_modules --quiet .", - "start": "NODE_PATH=./src node node_modules/react-native/local-cli/cli.js start", - "test": "NODE_PATH=./src mocha --compilers js:babel-register", + "start": "node node_modules/react-native/local-cli/cli.js start", + "test": "mocha --compilers js:babel-register", "postinstall": "remotedev-debugger --hostname localhost --port 5678 --injectserver" }, "babel": { "presets": [ "react-native" + ], + "plugins": [ + ["resolver", {"resolveDirs": ["src"]}] ] } } diff --git a/rn-cli.config.js b/rn-cli.config.js new file mode 100644 index 000000000..10d51b429 --- /dev/null +++ b/rn-cli.config.js @@ -0,0 +1,15 @@ +// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved. +// See License.txt for license information. + +var path = require('path'); + +var config = { + getProjectRoots() { + return [ + path.resolve(__dirname, '.'), + path.resolve(__dirname, './src') + ]; + } +}; + +module.exports = config; \ No newline at end of file diff --git a/src/actions/client.js b/src/actions/client.js index 07ef3f0c4..a4f6166ea 100644 --- a/src/actions/client.js +++ b/src/actions/client.js @@ -33,8 +33,6 @@ export class Client { setUrl(url) { this.url = url; - console.log('aaaaaa ' + this.url); - console.log(this); } setAcceptLanguage(locale) { diff --git a/src/store/configureStore.dev.js b/src/store/configureStore.dev.js index 95c0d172b..17f614328 100644 --- a/src/store/configureStore.dev.js +++ b/src/store/configureStore.dev.js @@ -23,7 +23,7 @@ export default function configureStore(preloadedState) { if (module.hot) { // Enable Webpack hot module replacement for reducers module.hot.accept(() => { - const nextRootReducer = require('reducers/index.js').default; // eslint-disable-line global-require + const nextRootReducer = require('../reducers/index.js').default; // eslint-disable-line global-require store.replaceReducer(nextRootReducer); }); }