Skip to content

Commit e5adecd

Browse files
Merge pull request #191 from fusioncharts/feature/support-2399
Support-2399 : Updated ReadME.md
2 parents 1138214 + 87dbb64 commit e5adecd

File tree

1 file changed

+6
-49
lines changed

1 file changed

+6
-49
lines changed

README.md

Lines changed: 6 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -89,45 +89,23 @@ npx create-expo-app My-test-app.
8989
```
9090
npm i react-native-fusioncharts
9191
```
92+
5. Replace the code in the "App.js" file to receive a desired chart. [Example](https://github.com/fusioncharts/react-native-fusioncharts#quick-start)
9293

93-
5. Now create the "metro.config.js" in the root folder by running this command:
94-
```
95-
npx expo customize metro.config.js
96-
```
97-
98-
6. Add the following code in metro.config.js file:
99-
```javascript
100-
const { getDefaultConfig } = require('expo/metro-config');
101-
102-
const config = getDefaultConfig(__dirname);
103-
104-
config.resolver.assetExts.push(
105-
// Adds support for `.fcscript` files for Fusionchart
106-
'fcscript'
107-
);
108-
module.exports = config;
109-
110-
```
111-
112-
7. Replace the code in the "App.js" file to receive a desired chart. [Example](https://github.com/fusioncharts/react-native-fusioncharts#quick-start)
113-
114-
8. Run the following command:
94+
6. Run the following command:
11595
```expo start```
11696
Expo should create a QR-code in your Command Prompt window.
11797

118-
9. Open the Expo Go application on your device – you should have installed it in order to run your FusionCharts app on this device.
98+
7. Open the Expo Go application on your device – you should have installed it in order to run your FusionCharts app on this device.
11999

120-
10. Make sure your device is on the same Wi-Fi network as the computer where you are executing Expo commands.
100+
8. Make sure your device is on the same Wi-Fi network as the computer where you are executing Expo commands.
121101

122-
11. Scan the QR-code with the Expo Go scanner. The application will run on this device. It should display the charts properly.
102+
9. Scan the QR-code with the Expo Go scanner. The application will run on this device. It should display the charts properly.
123103

124-
12. You can make changes to your code while running the application on your device: it should automatically reload after you save the changes.
104+
10. You can make changes to your code while running the application on your device: it should automatically reload after you save the changes.
125105

126106

127107
## How to create your own application using FusionCharts – with React-Native CLI
128108

129-
130-
131109
1. Make sure you have the latest versions of Node and JDK installed in your environment. Dependencies for Android and iOS emulators.
132110
should also be setup properly. Check the official [React Native documentation](https://reactnative.dev/docs/environment-setup) for more details.
133111

@@ -159,27 +137,6 @@ should also be setup properly. Check the official [React Native documentation](h
159137

160138
After installing `react-native-fusioncharts`, follow the steps below:
161139

162-
It is required to add the .fcscript into the asset extensions section of metro.config.js file, or create that file within your project, and configure it like below:
163-
164-
```javascript
165-
const { getDefaultConfig } = require('expo/metro-config');
166-
const { mergeConfig } = require('@react-native/metro-config');
167-
168-
module.exports = function (baseConfig) {
169-
const defaultConfig = mergeConfig(baseConfig, getDefaultConfig(__dirname));
170-
const { resolver: { assetExts, sourceExts } } = defaultConfig;
171-
172-
return mergeConfig(
173-
defaultConfig,
174-
{
175-
resolver: {
176-
sourceExts,
177-
assetExts: [...assetExts, 'fcscript']
178-
},
179-
},
180-
);
181-
};
182-
```
183140

184141
## Quick Start
185142

0 commit comments

Comments
 (0)