Skip to content

Commit

Permalink
Document to create the configuration file
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthieu Napoli committed Sep 12, 2018
1 parent 9172304 commit 27fa4a2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
3 changes: 3 additions & 0 deletions App/Service/WeatherService.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import { create } from 'apisauce'
import { Config } from 'App/Config'

const weatherApiClient = create({
/**
* Import the config from the App/Config/index.js file
*/
baseURL: Config.API_URL,
headers: {
Accept: 'application/json',
Expand Down
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ The boilerplate will follow new React-Native releases as soon as libraries and t
## Directory layout

- [`App/Components`](App/Components): presentational components
- [`App/Config`](App/Config): configuration of the application
- [`App/Containers`](App/Containers): container components
- [`App/Images`](App/Images): images used by the application
- [`App/Stores`](App/Stores): redux [actions, reducers and stores](https://redux.js.org/basics)
Expand All @@ -41,22 +42,26 @@ You also need to install the dependencies required by React Native:
- for [Android development](https://facebook.github.io/react-native/docs/getting-started.html#installing-dependencies-3)
- for [iOS development](https://facebook.github.io/react-native/docs/getting-started.html#installing-dependencies)

## Usage
## Using the boilerplate

To create a new project using the boilerplate:

- clone this repository
- remove the previous git history: `rm -rf .git/`
- install the npm dependencies by running `yarn`
- rename the React Native project to your own project name: `npm run rename -- <YourProjectName>` (the default name is `Boilerplate`)
- remove the LICENSE file and the License section from the README if your project is not open source
- remove the LICENSE file and the "License" section from the README if your project is not open source

Feel free to remove this section from the README as you will no longer need it in your project. You are encouraged to keep the rest of the documentation in your project so that it is self-explanatory.
Feel free to remove the section "Using the boilerplate" from the README (you will not need it anymore in your project). You are encouraged to keep the rest of the documentation in your project so that it is self-explanatory.

You can now create a new git repository for your project (using `git init`) and create the first commit.

## Running the project

Assuming you have all the requirements installed, you can setup and run the project by running:

- `yarn install` to install the dependencies
- create your [configuration file `App/Config/index.js`](App/Config) from `index.dev.js` (in you are in dev environment) and fill the missing values
- `react-native run-android` to run the Android application (remember to start a simulator or connect an Android phone)
- `react-native run-ios` to run the iOS application (remember to start a simulator or connect an iPhone phone)

Expand Down

0 comments on commit 27fa4a2

Please sign in to comment.