From ec27927cd5b544dfdb9c536e7857fd9bb759ccdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20Fallr=C3=B8?= Date: Thu, 30 May 2019 22:26:39 +0200 Subject: [PATCH] Infra organization rename (#72) * [INFRA] Organization rename * [INFRA] Fix missing change, update getting started docs * [INFRA] Use Travis CI for publishing to NPM --- .travis.yml | 15 ++++++++++++--- CONTRIBUTING.md | 4 ++-- README.md | 8 ++++---- android/install.md | 4 ++-- docs/GettingStarted.md | 16 +++++----------- example/android/settings.gradle | 2 +- example/ios/Podfile | 2 +- .../RNMapboxGLExample.xcodeproj/project.pbxproj | 8 ++++---- example/package.json | 2 +- example/scripts/watch_rngl.js | 2 +- example/src/App.js | 2 +- .../src/examples/ChoroplethLayerByZoomLevel.js | 2 +- example/src/examples/CreateOfflineRegion.js | 2 +- example/src/examples/CustomIcon.js | 2 +- example/src/examples/CustomVectorSource.js | 2 +- example/src/examples/DataDrivenCircleColors.js | 2 +- example/src/examples/DriveTheLine.js | 2 +- example/src/examples/EarthQuakes.js | 2 +- example/src/examples/FitBounds.js | 2 +- example/src/examples/FlyTo.js | 2 +- example/src/examples/GeoJSONSource.js | 2 +- example/src/examples/GetCenter.js | 2 +- example/src/examples/GetZoom.js | 2 +- example/src/examples/ImageOverlay.js | 2 +- example/src/examples/IndoorBuilding.js | 2 +- example/src/examples/PointInMapView.js | 2 +- example/src/examples/QueryAtPoint.js | 2 +- example/src/examples/QueryWithRect.js | 2 +- example/src/examples/SetHeading.js | 2 +- example/src/examples/SetPitch.js | 2 +- .../examples/SetUserLocationVerticalAlignment.js | 2 +- example/src/examples/SetUserTrackingModes.js | 2 +- example/src/examples/ShapeSourceIcon.js | 2 +- example/src/examples/ShowClick.js | 2 +- example/src/examples/ShowMap.js | 2 +- example/src/examples/ShowPointAnnotation.js | 2 +- example/src/examples/ShowRegionDidChange.js | 2 +- example/src/examples/TakeSnapshot.js | 2 +- example/src/examples/TakeSnapshotWithMap.js | 2 +- example/src/examples/TwoByTwo.js | 2 +- example/src/examples/UserLocationChange.js | 2 +- example/src/examples/WatercolorRasterTiles.js | 2 +- example/src/examples/YoYo.js | 2 +- example/src/examples/common/PulseCircleLayer.js | 2 +- example/src/scenes/Home.js | 2 +- example/src/utils/RouteSimulator.js | 2 +- index.d.ts | 3 --- ios/install.md | 8 ++++---- package.json | 9 ++++++--- react-native-mapbox-gl.podspec | 4 ++-- scripts/autogenerate.js | 2 +- 51 files changed, 82 insertions(+), 79 deletions(-) diff --git a/.travis.yml b/.travis.yml index b856bf11a..15a651f28 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,7 @@ matrix: - $HOME/.gradle/caches/ - $HOME/.gradle/wrapper/ before_cache: - - rm -f example/node_modules/\@react-native-mapbox/ + - rm -f example/node_modules/\@react-native-mapbox-gl/ - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock - rm -fr $HOME/.gradle/caches/*/plugin-resolution/ - os: osx @@ -35,7 +35,7 @@ matrix: - example/node_modules - $HOME/Library/Caches/Homebrew before_cache: - - rm -f example/node_modules/\@react-native-mapbox/ + - rm -f example/node_modules/\@react-native-mapbox-gl/ - brew cleanup podfile: example/ios/Podfile @@ -47,7 +47,7 @@ install: - cd $TRAVIS_BUILD_DIR/example - echo $MAPBOX_ACCESS_TOKEN > ./accesstoken - find node_modules -name ".git" -exec rm -r "{}" \; || true - - rm -rf example/node_modules/\@react-native-mapbox/ + - rm -rf example/node_modules/\@react-native-mapbox-gl/ - yarn install - echo $TRAVIS_OS_NAME - | @@ -74,3 +74,12 @@ script: - yarn global add -g 'jest@24.8.0' - yarn install - yarn run unittest +deploy: + provider: npm + email: kristfallro@gmail.com + api_key: + secure: B2hTPnT+8dWEbpBc8c2/8rwlmha8iVkRXzj88W+bgsg3k1c+tX+fNTJtbHqtahMuLfkBn6iSxfL9Bv70pXUSkdjyArlE7QdddzMx6UOO9vjoReuh1lyWNTHDx2u9iOSFYX1zsEJrf6wXkfhAtrBqF/tg2pu2NdHcaTy9grhPGnQgFpVCYKrQ67uoursqavd0nUiXVAteLH12zo0Nn1LhchogWA6CZPzz5PNgOv/KuiGIt/fmcg/Y7nlwI5BL0R29MmTIDR33tP509lFwyFTgqY/Xv4jWy0Miw+r0WQFYllkncj6dpuJ7FTdmOMfwL5vJX7B+kpZAtiBlXWtuIetRAfa/1KIWqeSIAYZTNFoEOymOXQM6DWklB3guGkAMnXNZslUvUevPzAY4SUL5fcoD+3FO8H4VAm328+hCtQWkyZbNLrU4X1FHd3BVY19YiHONHLGND9jzyzM/z0JocV0VG5azaIpPQDFVOjxhrWzTMAgwA+hNKtvQJegXIbW/sQJp12zPLv0dHJuIKjwXrnQtlSdr8JResHPFcLScuAWJ4QTSU2khcn0Ul5RnhCSGD3ic45nt46AzABqBhD6rMLesH+gbJ/i9v3LbiU7+r5JSTPfZ4ntJs168AeXy27hnWck54OjKIHp6JZ25jbJwTRCEZH1i7ETYKcheyTRR4sDiUxI= + on: + tags: true + repo: react-native-mapbox-gl/maps + branch: master \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 777585e7e..2a39e1257 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,10 +7,10 @@ 1. `cd` into your project 1. You have 2 options for linking `react-native-mapbox-gl` * Use `react-native link` - * Clone `@react-native-mapbox/maps` into the `node_modules` folder + * Clone `@react-native-mapbox-gl/maps` into the `node_modules` folder 1. Go through a normal install process for your platform -Once installed, you can edit any file in `@react-native-mapbox/maps`, +Once installed, you can edit any file in `@react-native-mapbox-gl/maps`, commit the changes and push them to a fork for creating a pull request. ## Best practices for PR's diff --git a/README.md b/README.md index ec48c8e2c..85e26e612 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ _An unofficial React Native library for building maps with the [Mapbox Maps SDK for iOS](https://www.mapbox.com/ios-sdk/) and [Mapbox Maps SDK for Android](https://www.mapbox.com/android-sdk/)_ [![npm version](https://badge.fury.io/js/%40mapbox%2Freact-native-mapbox-gl.svg)](https://badge.fury.io/js/%40mapbox%2Freact-native-mapbox-gl) -![build_status](https://travis-ci.org/react-native-mapbox/maps.svg?branch=master) +![build_status](https://travis-ci.org/react-native-mapbox-gl/maps.svg?branch=master) ## Installation @@ -15,18 +15,18 @@ _An unofficial React Native library for building maps with the [Mapbox Maps SDK **Git** ``` -git clone git@github.com:react-native-mapbox/maps.git +git clone git@github.com:react-native-mapbox-gl/maps.git cd maps ``` **Yarn** ``` -yarn add @react-native-mapbox/maps +yarn add @react-native-mapbox-gl/maps ``` **Npm** ``` -npm install @react-native-mapbox/maps --save +npm install @react-native-mapbox-gl/maps --save ``` ## Installation Guides diff --git a/android/install.md b/android/install.md index 7bed1740a..79c11501b 100644 --- a/android/install.md +++ b/android/install.md @@ -43,7 +43,7 @@ dependencies { implementation fileTree(dir: "libs", include: ["*.jar"]) implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}" implementation "com.facebook.react:react-native:+" // From node_modules -+ implementation project(':react-native-mapbox/maps') ++ implementation project(':react-native-mapbox-gl/maps') } ``` @@ -60,7 +60,7 @@ Include project, so gradle knows where to find the project rootProject.name = +include ':@react-native-mapbox_maps' -+project(':@react-native-mapbox_maps').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-mapbox/maps/android/rctmgl') ++project(':@react-native-mapbox_maps').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-mapbox-gl/maps/android/rctmgl') include ':app'¬ ``` diff --git a/docs/GettingStarted.md b/docs/GettingStarted.md index b747526ef..76a5da9a4 100644 --- a/docs/GettingStarted.md +++ b/docs/GettingStarted.md @@ -1,6 +1,6 @@ # Getting Started -Congratulations, you successfully installed react-native-mapbox/maps! 🎉 +Congratulations, you successfully installed react-native-mapbox-gl/maps! 🎉 Where to go from here? You can head straight to [examples](/example) folder if you want to jump into the deep end. However, if you prefer an easier ramp-up, then make sure to stick around and check out the guides below. @@ -13,7 +13,7 @@ You can create and manage your access tokens on your [Mapbox Account page](https Once you have your accessToken, set it like this ```js -import MapboxGL from "@react-native-mapbox/maps"; +import MapboxGL from "@react-native-mapbox-gl/maps"; MapboxGL.setAccessToken(""); ``` @@ -23,13 +23,9 @@ MapboxGL.setAccessToken(""); By default mapbox collects telemetry. If you would like to programmatically disable this within your app add the code below. -Notice that `isTelemetryEnabled` returns a Promise. - ```js componentDidMount() { - MapboxGL.isTelemetryEnabled().then(isEnabled => { - isEnabled && MapboxGL.setTelemetryEnabled(false); - }); + MapboxGL.setTelemetryEnabled(false); } ``` @@ -40,7 +36,7 @@ For more information on mapbox and telemetry: [https://www.mapbox.com/telemetry] ```js import React, { Component } from "react"; import { StyleSheet, View } from "react-native"; -import MapboxGL from "@react-native-mapbox/maps"; +import MapboxGL from "@react-native-mapbox-gl/maps"; MapboxGL.setAccessToken(""); @@ -63,9 +59,7 @@ const styles = StyleSheet.create({ export default class App extends Component { componentDidMount() { - MapboxGL.isTelemetryEnabled().then(isEnabled => { - isEnabled && MapboxGL.setTelemetryEnabled(false); - }); + MapboxGL.setTelemetryEnabled(false); } render() { diff --git a/example/android/settings.gradle b/example/android/settings.gradle index 4c36bd7a2..9d8fcd267 100644 --- a/example/android/settings.gradle +++ b/example/android/settings.gradle @@ -2,7 +2,7 @@ rootProject.name = 'RNMapboxGLExample' include ':app' include ':android-mapbox-react-native-mapbox-gl' -project(':android-mapbox-react-native-mapbox-gl').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-mapbox/maps/android/rctmgl') +project(':android-mapbox-react-native-mapbox-gl').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-mapbox-gl/maps/android/rctmgl') include ':react-native-vector-icons' project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android') diff --git a/example/ios/Podfile b/example/ios/Podfile index 71368051d..1469acfda 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -30,7 +30,7 @@ target 'RNMapboxGLExample' do pod 'Folly', :podspec => "#{rn_path}/third-party-podspecs/Folly.podspec" # Mapbox - pod 'react-native-mapbox-gl', :path => '../node_modules/@react-native-mapbox/maps' + pod 'react-native-mapbox-gl', :path => '../node_modules/@react-native-mapbox-gl/maps' # RN-Vector-Icons pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons' diff --git a/example/ios/RNMapboxGLExample.xcodeproj/project.pbxproj b/example/ios/RNMapboxGLExample.xcodeproj/project.pbxproj index 597c119d3..511e16a59 100644 --- a/example/ios/RNMapboxGLExample.xcodeproj/project.pbxproj +++ b/example/ios/RNMapboxGLExample.xcodeproj/project.pbxproj @@ -1252,7 +1252,7 @@ ); inputPaths = ( "${SRCROOT}/Pods/Target Support Files/Pods-RNMapboxGLExample/Pods-RNMapboxGLExample-frameworks.sh", - "${PODS_ROOT}/../../node_modules/@react-native-mapbox/maps/ios/Mapbox.framework", + "${PODS_ROOT}/../../node_modules/@react-native-mapbox-gl/maps/ios/Mapbox.framework", ); name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( @@ -1350,7 +1350,7 @@ ); inputPaths = ( "${SRCROOT}/Pods/Target Support Files/Pods-RNMapboxGLExample/Pods-RNMapboxGLExample-frameworks.sh", - "${PODS_ROOT}/../../node_modules/@react-native-mapbox/maps/ios/Mapbox.framework", + "${PODS_ROOT}/../../node_modules/@react-native-mapbox-gl/maps/ios/Mapbox.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( @@ -1476,7 +1476,7 @@ DEAD_CODE_STRIPPING = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/../node_modules/@mapbox/react-native-mapbox-gl/ios", + "$(PROJECT_DIR)/../node_modules/@react-native-mapbox-gl/maps/ios", ); HEADER_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = RNMapboxGLExample/Info.plist; @@ -1503,7 +1503,7 @@ CURRENT_PROJECT_VERSION = 1; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/../node_modules/@mapbox/react-native-mapbox-gl/ios", + "$(PROJECT_DIR)/../node_modules/@react-native-mapbox-gl/maps/ios", ); HEADER_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = RNMapboxGLExample/Info.plist; diff --git a/example/package.json b/example/package.json index 0b6f42828..65dfd4625 100644 --- a/example/package.json +++ b/example/package.json @@ -14,7 +14,7 @@ }, "dependencies": { "@mapbox/geo-viewport": "^0.4.0", - "@react-native-mapbox/maps": "file:../react-native-mapbox-maps-7.0.0.tgz", + "@react-native-mapbox-gl/maps": "file:../react-native-mapbox-gl-maps-7.0.0.tgz", "@turf/along": "^5.1.5", "@turf/bearing": "^5.1.5", "@turf/distance": "^5.1.5", diff --git a/example/scripts/watch_rngl.js b/example/scripts/watch_rngl.js index ed99e904b..2a0127d95 100755 --- a/example/scripts/watch_rngl.js +++ b/example/scripts/watch_rngl.js @@ -2,7 +2,7 @@ const path = require('path'); const fs = require('fs-extra'); const RNGL_DIR = path.join('..'); -const RNGL_EXAMPLE_DIR = path.join('node_modules', '@mapbox', 'react-native-mapbox-gl'); +const RNGL_EXAMPLE_DIR = path.join('node_modules', '@react-native-mapbox-gl', 'maps'); function copyFile(source, dest) { return new Promise((resolve, reject) => { diff --git a/example/src/App.js b/example/src/App.js index 01ca8c750..28a31c129 100755 --- a/example/src/App.js +++ b/example/src/App.js @@ -1,5 +1,5 @@ import React from 'react'; -import MapboxGL from '@react-native-mapbox/maps'; +import MapboxGL from '@react-native-mapbox-gl/maps'; import { FlatList, Modal, diff --git a/example/src/examples/ChoroplethLayerByZoomLevel.js b/example/src/examples/ChoroplethLayerByZoomLevel.js index d262eab8f..de20ffdb6 100755 --- a/example/src/examples/ChoroplethLayerByZoomLevel.js +++ b/example/src/examples/ChoroplethLayerByZoomLevel.js @@ -1,5 +1,5 @@ import React from 'react'; -import MapboxGL from '@react-native-mapbox/maps'; +import MapboxGL from '@react-native-mapbox-gl/maps'; import sheet from '../styles/sheet'; diff --git a/example/src/examples/CreateOfflineRegion.js b/example/src/examples/CreateOfflineRegion.js index b123b253b..c7fcc058d 100755 --- a/example/src/examples/CreateOfflineRegion.js +++ b/example/src/examples/CreateOfflineRegion.js @@ -7,7 +7,7 @@ import { Dimensions, StyleSheet, } from 'react-native'; -import MapboxGL from '@react-native-mapbox/maps'; +import MapboxGL from '@react-native-mapbox-gl/maps'; import geoViewport from '@mapbox/geo-viewport'; import sheet from '../styles/sheet'; diff --git a/example/src/examples/CustomIcon.js b/example/src/examples/CustomIcon.js index e987db888..b3fdffe3c 100755 --- a/example/src/examples/CustomIcon.js +++ b/example/src/examples/CustomIcon.js @@ -1,6 +1,6 @@ import React from 'react'; import {Text} from 'react-native'; -import MapboxGL from '@react-native-mapbox/maps'; +import MapboxGL from '@react-native-mapbox-gl/maps'; import sheet from '../styles/sheet'; import exampleIcon from '../assets/example.png'; diff --git a/example/src/examples/CustomVectorSource.js b/example/src/examples/CustomVectorSource.js index 6b3f208ac..d91e0bf44 100755 --- a/example/src/examples/CustomVectorSource.js +++ b/example/src/examples/CustomVectorSource.js @@ -1,5 +1,5 @@ import React from 'react'; -import MapboxGL from '@react-native-mapbox/maps'; +import MapboxGL from '@react-native-mapbox-gl/maps'; import sheet from '../styles/sheet'; diff --git a/example/src/examples/DataDrivenCircleColors.js b/example/src/examples/DataDrivenCircleColors.js index f1c5c3055..0b189120a 100755 --- a/example/src/examples/DataDrivenCircleColors.js +++ b/example/src/examples/DataDrivenCircleColors.js @@ -1,5 +1,5 @@ import React from 'react'; -import MapboxGL from '@react-native-mapbox/maps'; +import MapboxGL from '@react-native-mapbox-gl/maps'; import sheet from '../styles/sheet'; diff --git a/example/src/examples/DriveTheLine.js b/example/src/examples/DriveTheLine.js index 7e6dc9c1b..3a8bc39de 100755 --- a/example/src/examples/DriveTheLine.js +++ b/example/src/examples/DriveTheLine.js @@ -1,5 +1,5 @@ import React from 'react'; -import MapboxGL from '@react-native-mapbox/maps'; +import MapboxGL from '@react-native-mapbox-gl/maps'; import {View, StyleSheet} from 'react-native'; import {Button} from 'react-native-elements'; import {lineString as makeLineString} from '@turf/helpers'; diff --git a/example/src/examples/EarthQuakes.js b/example/src/examples/EarthQuakes.js index 4ec8f47ac..2894e6e31 100755 --- a/example/src/examples/EarthQuakes.js +++ b/example/src/examples/EarthQuakes.js @@ -1,5 +1,5 @@ import React from 'react'; -import MapboxGL from '@react-native-mapbox/maps'; +import MapboxGL from '@react-native-mapbox-gl/maps'; import sheet from '../styles/sheet'; import {SF_OFFICE_COORDINATE} from '../utils'; diff --git a/example/src/examples/FitBounds.js b/example/src/examples/FitBounds.js index 5cff17c92..cb3608bdf 100755 --- a/example/src/examples/FitBounds.js +++ b/example/src/examples/FitBounds.js @@ -1,5 +1,5 @@ import React from 'react'; -import MapboxGL from '@react-native-mapbox/maps'; +import MapboxGL from '@react-native-mapbox-gl/maps'; import sheet from '../styles/sheet'; diff --git a/example/src/examples/FlyTo.js b/example/src/examples/FlyTo.js index 006d30393..88f5f498f 100755 --- a/example/src/examples/FlyTo.js +++ b/example/src/examples/FlyTo.js @@ -1,6 +1,6 @@ import React from 'react'; import {Alert} from 'react-native'; -import MapboxGL from '@react-native-mapbox/maps'; +import MapboxGL from '@react-native-mapbox-gl/maps'; import sheet from '../styles/sheet'; diff --git a/example/src/examples/GeoJSONSource.js b/example/src/examples/GeoJSONSource.js index 10b88883c..5aba46f7e 100755 --- a/example/src/examples/GeoJSONSource.js +++ b/example/src/examples/GeoJSONSource.js @@ -1,5 +1,5 @@ import React from 'react'; -import MapboxGL from '@react-native-mapbox/maps'; +import MapboxGL from '@react-native-mapbox-gl/maps'; import sheet from '../styles/sheet'; import gridPattern from '../assets/grid_pattern.png'; diff --git a/example/src/examples/GetCenter.js b/example/src/examples/GetCenter.js index 0104ad6d1..e51482b9c 100755 --- a/example/src/examples/GetCenter.js +++ b/example/src/examples/GetCenter.js @@ -1,6 +1,6 @@ import React from 'react'; import {Text} from 'react-native'; -import MapboxGL from '@react-native-mapbox/maps'; +import MapboxGL from '@react-native-mapbox-gl/maps'; import BaseExamplePropTypes from './common/BaseExamplePropTypes'; import Page from './common/Page'; diff --git a/example/src/examples/GetZoom.js b/example/src/examples/GetZoom.js index 3d414df8a..78e02c602 100755 --- a/example/src/examples/GetZoom.js +++ b/example/src/examples/GetZoom.js @@ -1,6 +1,6 @@ import React from 'react'; import {Text} from 'react-native'; -import MapboxGL from '@react-native-mapbox/maps'; +import MapboxGL from '@react-native-mapbox-gl/maps'; import BaseExamplePropTypes from './common/BaseExamplePropTypes'; import Page from './common/Page'; diff --git a/example/src/examples/ImageOverlay.js b/example/src/examples/ImageOverlay.js index 0108e3263..d670c8d49 100755 --- a/example/src/examples/ImageOverlay.js +++ b/example/src/examples/ImageOverlay.js @@ -1,5 +1,5 @@ import React from 'react'; -import MapboxGL from '@react-native-mapbox/maps'; +import MapboxGL from '@react-native-mapbox-gl/maps'; import sheet from '../styles/sheet'; import radar0 from '../assets/radar.png'; diff --git a/example/src/examples/IndoorBuilding.js b/example/src/examples/IndoorBuilding.js index 13f00c23b..1223101c4 100755 --- a/example/src/examples/IndoorBuilding.js +++ b/example/src/examples/IndoorBuilding.js @@ -1,6 +1,6 @@ import React from 'react'; import {View, StyleSheet} from 'react-native'; -import MapboxGL from '@react-native-mapbox/maps'; +import MapboxGL from '@react-native-mapbox-gl/maps'; import {Slider} from 'react-native-elements'; import sheet from '../styles/sheet'; diff --git a/example/src/examples/PointInMapView.js b/example/src/examples/PointInMapView.js index 00796e358..e696a1f41 100755 --- a/example/src/examples/PointInMapView.js +++ b/example/src/examples/PointInMapView.js @@ -1,6 +1,6 @@ import React from 'react'; import {Text} from 'react-native'; -import MapboxGL from '@react-native-mapbox/maps'; +import MapboxGL from '@react-native-mapbox-gl/maps'; import BaseExamplePropTypes from './common/BaseExamplePropTypes'; import Page from './common/Page'; diff --git a/example/src/examples/QueryAtPoint.js b/example/src/examples/QueryAtPoint.js index 1b08ddd9b..0e4400c29 100755 --- a/example/src/examples/QueryAtPoint.js +++ b/example/src/examples/QueryAtPoint.js @@ -1,6 +1,6 @@ import React from 'react'; import {Text} from 'react-native'; -import MapboxGL from '@react-native-mapbox/maps'; +import MapboxGL from '@react-native-mapbox-gl/maps'; import sheet from '../styles/sheet'; import nycJSON from '../assets/nyc_geojson.json'; diff --git a/example/src/examples/QueryWithRect.js b/example/src/examples/QueryWithRect.js index c89582af9..c0c22be54 100755 --- a/example/src/examples/QueryWithRect.js +++ b/example/src/examples/QueryWithRect.js @@ -1,6 +1,6 @@ import React from 'react'; import {Text} from 'react-native'; -import MapboxGL from '@react-native-mapbox/maps'; +import MapboxGL from '@react-native-mapbox-gl/maps'; import sheet from '../styles/sheet'; import nycJSON from '../assets/nyc_geojson.json'; diff --git a/example/src/examples/SetHeading.js b/example/src/examples/SetHeading.js index 7c2426418..7ceee4544 100755 --- a/example/src/examples/SetHeading.js +++ b/example/src/examples/SetHeading.js @@ -1,5 +1,5 @@ import React from 'react'; -import MapboxGL from '@react-native-mapbox/maps'; +import MapboxGL from '@react-native-mapbox-gl/maps'; import sheet from '../styles/sheet'; diff --git a/example/src/examples/SetPitch.js b/example/src/examples/SetPitch.js index 9d9bb1195..1a633b002 100755 --- a/example/src/examples/SetPitch.js +++ b/example/src/examples/SetPitch.js @@ -1,5 +1,5 @@ import React from 'react'; -import MapboxGL from '@react-native-mapbox/maps'; +import MapboxGL from '@react-native-mapbox-gl/maps'; import sheet from '../styles/sheet'; diff --git a/example/src/examples/SetUserLocationVerticalAlignment.js b/example/src/examples/SetUserLocationVerticalAlignment.js index 22f9b8f6d..3f669f0ab 100755 --- a/example/src/examples/SetUserLocationVerticalAlignment.js +++ b/example/src/examples/SetUserLocationVerticalAlignment.js @@ -1,5 +1,5 @@ import React from 'react'; -import MapboxGL from '@react-native-mapbox/maps'; +import MapboxGL from '@react-native-mapbox-gl/maps'; import sheet from '../styles/sheet'; import {onSortOptions} from '../utils'; diff --git a/example/src/examples/SetUserTrackingModes.js b/example/src/examples/SetUserTrackingModes.js index 51b532714..4aeb5cd03 100755 --- a/example/src/examples/SetUserTrackingModes.js +++ b/example/src/examples/SetUserTrackingModes.js @@ -1,6 +1,6 @@ import React from 'react'; import {Text} from 'react-native'; -import MapboxGL from '@react-native-mapbox/maps'; +import MapboxGL from '@react-native-mapbox-gl/maps'; import sheet from '../styles/sheet'; import {onSortOptions} from '../utils'; diff --git a/example/src/examples/ShapeSourceIcon.js b/example/src/examples/ShapeSourceIcon.js index 5efb48d91..d763f3fbc 100755 --- a/example/src/examples/ShapeSourceIcon.js +++ b/example/src/examples/ShapeSourceIcon.js @@ -1,5 +1,5 @@ import React from 'react'; -import MapboxGL from '@react-native-mapbox/maps'; +import MapboxGL from '@react-native-mapbox-gl/maps'; import sheet from '../styles/sheet'; import exampleIcon from '../assets/example.png'; diff --git a/example/src/examples/ShowClick.js b/example/src/examples/ShowClick.js index d4f75a79a..d9448134a 100755 --- a/example/src/examples/ShowClick.js +++ b/example/src/examples/ShowClick.js @@ -1,6 +1,6 @@ import React from 'react'; import {Text} from 'react-native'; -import MapboxGL from '@react-native-mapbox/maps'; +import MapboxGL from '@react-native-mapbox-gl/maps'; import sheet from '../styles/sheet'; import {DEFAULT_CENTER_COORDINATE} from '../utils'; diff --git a/example/src/examples/ShowMap.js b/example/src/examples/ShowMap.js index 66b423383..380a16e90 100755 --- a/example/src/examples/ShowMap.js +++ b/example/src/examples/ShowMap.js @@ -1,6 +1,6 @@ import React from 'react'; import {Alert} from 'react-native'; -import MapboxGL from '@react-native-mapbox/maps'; +import MapboxGL from '@react-native-mapbox-gl/maps'; import sheet from '../styles/sheet'; import {onSortOptions} from '../utils'; diff --git a/example/src/examples/ShowPointAnnotation.js b/example/src/examples/ShowPointAnnotation.js index f5db31286..f4881cb15 100755 --- a/example/src/examples/ShowPointAnnotation.js +++ b/example/src/examples/ShowPointAnnotation.js @@ -1,6 +1,6 @@ import React from 'react'; import {Animated, View, Text, StyleSheet} from 'react-native'; -import MapboxGL from '@react-native-mapbox/maps'; +import MapboxGL from '@react-native-mapbox-gl/maps'; import sheet from '../styles/sheet'; diff --git a/example/src/examples/ShowRegionDidChange.js b/example/src/examples/ShowRegionDidChange.js index 73e07d8a7..68dd38e86 100644 --- a/example/src/examples/ShowRegionDidChange.js +++ b/example/src/examples/ShowRegionDidChange.js @@ -1,6 +1,6 @@ import React from 'react'; import {Text} from 'react-native'; -import MapboxGL from '@react-native-mapbox/maps'; +import MapboxGL from '@react-native-mapbox-gl/maps'; import sheet from '../styles/sheet'; import {DEFAULT_CENTER_COORDINATE, SF_OFFICE_COORDINATE} from '../utils'; diff --git a/example/src/examples/TakeSnapshot.js b/example/src/examples/TakeSnapshot.js index 82c9193f5..a4e7f0bf8 100755 --- a/example/src/examples/TakeSnapshot.js +++ b/example/src/examples/TakeSnapshot.js @@ -1,5 +1,5 @@ import React from 'react'; -import MapboxGL from '@react-native-mapbox/maps'; +import MapboxGL from '@react-native-mapbox-gl/maps'; import { View, Image, diff --git a/example/src/examples/TakeSnapshotWithMap.js b/example/src/examples/TakeSnapshotWithMap.js index f162b74b7..36f630a2f 100755 --- a/example/src/examples/TakeSnapshotWithMap.js +++ b/example/src/examples/TakeSnapshotWithMap.js @@ -1,6 +1,6 @@ import React from 'react'; import {StyleSheet, View, Text, TouchableOpacity, Image} from 'react-native'; -import MapboxGL from '@react-native-mapbox/maps'; +import MapboxGL from '@react-native-mapbox-gl/maps'; import sheet from '../styles/sheet'; import colors from '../styles/colors'; diff --git a/example/src/examples/TwoByTwo.js b/example/src/examples/TwoByTwo.js index c17c93875..b0c9b5a49 100755 --- a/example/src/examples/TwoByTwo.js +++ b/example/src/examples/TwoByTwo.js @@ -1,5 +1,5 @@ import React from 'react'; -import MapboxGL from '@react-native-mapbox/maps'; +import MapboxGL from '@react-native-mapbox-gl/maps'; import sheet from '../styles/sheet'; import smileyFaceGeoJSON from '../assets/smiley_face.json'; diff --git a/example/src/examples/UserLocationChange.js b/example/src/examples/UserLocationChange.js index d21ebc855..665a984c2 100755 --- a/example/src/examples/UserLocationChange.js +++ b/example/src/examples/UserLocationChange.js @@ -1,6 +1,6 @@ import React from 'react'; import {Text} from 'react-native'; -import MapboxGL from '@react-native-mapbox/maps'; +import MapboxGL from '@react-native-mapbox-gl/maps'; import sheet from '../styles/sheet'; diff --git a/example/src/examples/WatercolorRasterTiles.js b/example/src/examples/WatercolorRasterTiles.js index 5de297da4..984080ea4 100755 --- a/example/src/examples/WatercolorRasterTiles.js +++ b/example/src/examples/WatercolorRasterTiles.js @@ -1,6 +1,6 @@ import React from 'react'; import {View, StyleSheet} from 'react-native'; -import MapboxGL from '@react-native-mapbox/maps'; +import MapboxGL from '@react-native-mapbox-gl/maps'; import {Slider} from 'react-native-elements'; import sheet from '../styles/sheet'; diff --git a/example/src/examples/YoYo.js b/example/src/examples/YoYo.js index ce8c6c856..efdf8aacb 100755 --- a/example/src/examples/YoYo.js +++ b/example/src/examples/YoYo.js @@ -1,5 +1,5 @@ import React from 'react'; -import MapboxGL from '@react-native-mapbox/maps'; +import MapboxGL from '@react-native-mapbox-gl/maps'; import sheet from '../styles/sheet'; import colors from '../styles/colors'; diff --git a/example/src/examples/common/PulseCircleLayer.js b/example/src/examples/common/PulseCircleLayer.js index dc1a3a33f..8990b2d72 100755 --- a/example/src/examples/common/PulseCircleLayer.js +++ b/example/src/examples/common/PulseCircleLayer.js @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import {Animated} from 'react-native'; -import MapboxGL from '@react-native-mapbox/maps'; +import MapboxGL from '@react-native-mapbox-gl/maps'; const styles = { innerCircle: { diff --git a/example/src/scenes/Home.js b/example/src/scenes/Home.js index c809bfa32..636566c9c 100644 --- a/example/src/scenes/Home.js +++ b/example/src/scenes/Home.js @@ -1,5 +1,5 @@ import React from 'react'; -import MapboxGL from '@react-native-mapbox/maps'; +import MapboxGL from '@react-native-mapbox-gl/maps'; import {View, Text, FlatList, StyleSheet, TouchableOpacity} from 'react-native'; import {Icon} from 'react-native-elements'; diff --git a/example/src/utils/RouteSimulator.js b/example/src/utils/RouteSimulator.js index ca03f1335..b80d1790d 100755 --- a/example/src/utils/RouteSimulator.js +++ b/example/src/utils/RouteSimulator.js @@ -1,5 +1,5 @@ import {Animated} from 'react-native'; -import MapboxGL from '@react-native-mapbox/maps'; +import MapboxGL from '@react-native-mapbox-gl/maps'; import along from '@turf/along'; import findDistance from '@turf/distance'; diff --git a/index.d.ts b/index.d.ts index 85c5f508e..1571cdc84 100644 --- a/index.d.ts +++ b/index.d.ts @@ -13,9 +13,6 @@ import { * These are the typings for the Mapbox React Native module. * They are modelled after the documentation and may not be 100% accurate. * - * v6.1.1 - * https://github.com/nitaliano/react-native-mapbox-gl/tree/6.1.1 - * * Generated by Ryan Pope (https://github.com/RyPope) */ diff --git a/ios/install.md b/ios/install.md index 6ec13d0cb..37496a84e 100644 --- a/ios/install.md +++ b/ios/install.md @@ -29,7 +29,7 @@ To install with CocoaPods, add the following to your `Podfile`: ] # Mapbox - pod 'react-native-mapbox-gl', :path => '../node_modules/@react-native-mapbox/maps' + pod 'react-native-mapbox-gl', :path => '../node_modules/@react-native-mapbox-gl/maps' # Third party pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec' @@ -49,7 +49,7 @@ Then run `pod install` and rebuild your project. ### Add Native Mapbox SDK Framework -Select your project in the `Project navigator`. Click `General` tab then add `node_modules/@react-native-mapbox/maps/ios/Mapbox.framework` to `Embedded Binaries`. :collision: **Important, make sure you're adding it to general -> `Embedded Binaries` :collision:** +Select your project in the `Project navigator`. Click `General` tab then add `node_modules/@react-native-mapbox-gl/maps/ios/Mapbox.framework` to `Embedded Binaries`. :collision: **Important, make sure you're adding it to general -> `Embedded Binaries` :collision:** Click 'Add other' to open the file browser and select Mapbox.framework. @@ -67,7 +67,7 @@ After adding Mapbox.framework it should be listed in your Embedded Binaries: ### Add React Native Mapbox SDK Files -In Xcode's `Project navigator`, right click on the `Libraries` folder ➜ `Add Files to <...>`. Add `node_modules/@react-native-mapbox/maps/ios/RCTMGL.xcodeproj`. +In Xcode's `Project navigator`, right click on the `Libraries` folder ➜ `Add Files to <...>`. Add `node_modules/@react-native-mapbox-gl/maps/ios/RCTMGL.xcodeproj`. ![](https://s3.systemlevel.com/docs-public/addfilesto.png) @@ -85,7 +85,7 @@ In the `Build Settings` of your application target search for `FRAMEWORK_SEARCH_ ![](https://s3.systemlevel.com/docs-public/frameworksearch.png) -Add `$(PROJECT_DIR)/../node_modules/@react-native-mapbox/maps/ios` non-recursive to your `Framework Search Paths`. +Add `$(PROJECT_DIR)/../node_modules/@react-native-mapbox-gl/maps/ios` non-recursive to your `Framework Search Paths`. ![](https://s3.systemlevel.com/docs-public/frameworksearchadd.png) diff --git a/package.json b/package.json index 2996929b5..1aac58a10 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,11 @@ { - "name": "@react-native-mapbox/maps", + "name": "@react-native-mapbox-gl/maps", "description": "A Mapbox GL react native module for creating custom maps", "version": "7.0.0", - "author": "Nick Italiano", + "publishConfig": { + "access": "public" + }, + "author": "React Native Mapbox Team", "main": "./javascript/index.js", "keywords": [ "gl", @@ -14,7 +17,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/react-native-mapbox/maps" + "url": "https://github.com/react-native-mapbox-gl/maps" }, "scripts": { "fetch:ios:sdk": "node ./scripts/download-mapbox-gl-native-ios-if-on-mac.js 4.9.0", diff --git a/react-native-mapbox-gl.podspec b/react-native-mapbox-gl.podspec index b3ecf4f71..fddf70c1d 100644 --- a/react-native-mapbox-gl.podspec +++ b/react-native-mapbox-gl.podspec @@ -7,10 +7,10 @@ Pod::Spec.new do |s| s.summary = "React Native Component for Mapbox GL" s.version = package['version'] s.authors = { "Nick Italiano" => "ni6@njit.edu" } - s.homepage = "https://github.com/mapbox/react-native-mapbox-gl#readme" + s.homepage = "https://github.com/@react-native-mapbox-gl/maps#readme" s.license = "MIT" s.platform = :ios, "8.0" - s.source = { :git => "https://github.com/mapbox/react-native-mapbox-gl.git" } + s.source = { :git => "https://github.com/@react-native-mapbox-gl/maps.git" } s.source_files = "ios/RCTMGL/**/*.{h,m}" s.vendored_frameworks = 'ios/Mapbox.framework' diff --git a/scripts/autogenerate.js b/scripts/autogenerate.js index 8cc7289fc..d14689c2e 100644 --- a/scripts/autogenerate.js +++ b/scripts/autogenerate.js @@ -27,7 +27,7 @@ const OUTPUT_EXAMPLE_PREFIX = [ '..', 'example', 'node_modules', - '@react-native-mapbox', + '@react-native-mapbox-gl', 'maps', ]; const OUTPUT_PREFIX = outputToExample ? OUTPUT_EXAMPLE_PREFIX : ['..'];