From 6a7a3ced3a8980fc31537ce7a4f01aaf5509883e Mon Sep 17 00:00:00 2001 From: Benoit VALLON Date: Wed, 14 Oct 2015 15:36:49 -0400 Subject: [PATCH] Harmonizes the main entry files for build --- ios/iosApp/AppDelegate.m | 2 +- index.ios.js => src/index.ios.js | 6 +++--- src/{specificWebAndNW/main.js => index.js} | 4 ++-- webpack.config.js | 2 +- webpack.dist.config.js | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) rename index.ios.js => src/index.ios.js (86%) rename src/{specificWebAndNW/main.js => index.js} (80%) diff --git a/ios/iosApp/AppDelegate.m b/ios/iosApp/AppDelegate.m index f6231cb..703f03e 100644 --- a/ios/iosApp/AppDelegate.m +++ b/ios/iosApp/AppDelegate.m @@ -31,7 +31,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( * on the same Wi-Fi network. */ - jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"]; + jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/src/index.ios.bundle?platform=ios&dev=true"]; /** * OPTION 2 diff --git a/index.ios.js b/src/index.ios.js similarity index 86% rename from index.ios.js rename to src/index.ios.js index e1e0a27..b830270 100644 --- a/index.ios.js +++ b/src/index.ios.js @@ -12,9 +12,9 @@ import React, { } from 'react-native'; import { Component } from 'react'; -import Screen from './src/common/components/Screen'; -import Formulae from './src/common/components/Formulae'; -import Keyboard from './src/common/components/Keyboard'; +import Screen from './common/components/Screen'; +import Formulae from './common/components/Formulae'; +import Keyboard from './common/components/Keyboard'; class iosApp extends Component { render() { diff --git a/src/specificWebAndNW/main.js b/src/index.js similarity index 80% rename from src/specificWebAndNW/main.js rename to src/index.js index c5ee1b1..05ca008 100644 --- a/src/specificWebAndNW/main.js +++ b/src/index.js @@ -1,13 +1,13 @@ 'use strict'; -import App from '../common/components/App'; +import App from './common/components/App'; import React from 'react'; import ReactDOM from 'react-dom'; import { Router, Route } from 'react-router'; // CSS require('normalize.css'); -require('../styles/main.css'); +require('./styles/main.css'); var content = document.getElementById('content'); diff --git a/webpack.config.js b/webpack.config.js index 71243a4..8a20ea3 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -16,7 +16,7 @@ module.exports = { devtool: false, entry: [ 'webpack/hot/only-dev-server', - './src/specificWebAndNW/main.js' + './src/index.js' ], stats: { colors: true, diff --git a/webpack.dist.config.js b/webpack.dist.config.js index cc3e1ed..a65c7fe 100644 --- a/webpack.dist.config.js +++ b/webpack.dist.config.js @@ -16,7 +16,7 @@ module.exports = { }, debug: false, devtool: false, - entry: './src/specificWebAndNW/main.js', + entry: './src/index.js', stats: { colors: true, reasons: false