From c84b34535c3594f55825764b0e0b13ff9228c1c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moser=20Jos=C3=A9?= Date: Mon, 25 Jul 2022 11:29:41 +0100 Subject: [PATCH] update the readme for npm (#1523) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Moser José Co-authored-by: Wojciech Lewicki --- README.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 6f200963..b9800263 100644 --- a/README.md +++ b/README.md @@ -66,9 +66,9 @@ Install the JavaScript with: - ```bash - expo install react-native-svg - ``` +```bash +expo install react-native-svg +``` 📚 See the [**Expo docs**](https://docs.expo.io/versions/latest/sdk/svg/) for more info or jump ahead to [Usage](#Usage). @@ -77,10 +77,13 @@ Install the JavaScript with: 1. Install library from npm + ```bash npm install react-native-svg ``` + from yarn + ```bash yarn add react-native-svg ``` @@ -390,7 +393,7 @@ module.exports = (async () => { babelTransformerPath: require.resolve('react-native-svg-transformer'), }, resolver: { - assetExts: assetExts.filter(ext => ext !== 'svg'), + assetExts: assetExts.filter((ext) => ext !== 'svg'), sourceExts: [...sourceExts, 'svg'], }, }; @@ -1412,7 +1415,7 @@ import ReactDOMServer from 'react-dom/server'; const isWeb = Platform.OS === 'web'; -const childToWeb = child => { +const childToWeb = (child) => { const { type, props } = child; const name = type && type.displayName; const webName = name && name[0].toLowerCase() + name.slice(1); @@ -1420,7 +1423,7 @@ const childToWeb = child => { return {toWeb(props.children)}; }; -const toWeb = children => React.Children.map(children, childToWeb); +const toWeb = (children) => React.Children.map(children, childToWeb); export default class App extends React.Component { renderSvg() {