diff --git a/example/README.md b/example/README.md index 30412f0f6..f91f8ad6f 100644 --- a/example/README.md +++ b/example/README.md @@ -51,8 +51,8 @@ Not a Mapbox user yet? [Sign up for an account here](https://www.mapbox.com/sign cd example ``` * Create a file called `accesstoken` in the root of the example project and just paste in your [Mapbox access token](https://www.mapbox.com/studio/account/tokens/). (The `accesstoken` file is processed in postinstall, so you need to run `yarn install` after adding/changing accesstoken.) - * Install our dependencies using `yarn install`. +* Tell the TypeScript compiler to recompile when files are changed with `yarn dev`.
diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 083aa9f7d..dd5792b2e 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -360,13 +360,13 @@ PODS: - React-perflogger (= 0.68.1) - RNGestureHandler (1.10.3): - React-Core - - rnmapbox-maps (10.0.0-beta.7): + - rnmapbox-maps (10.0.0-beta.15): - MapboxMaps (~> 10.5.0) - React - React-Core - - rnmapbox-maps/DynamicLibrary (= 10.0.0-beta.7) + - rnmapbox-maps/DynamicLibrary (= 10.0.0-beta.15) - Turf - - rnmapbox-maps/DynamicLibrary (10.0.0-beta.7): + - rnmapbox-maps/DynamicLibrary (10.0.0-beta.15): - MapboxMaps (~> 10.5.0) - React - React-Core @@ -596,7 +596,7 @@ SPEC CHECKSUMS: React-runtimeexecutor: 7285b499d0339104b2813a1f58ad1ada4adbd6c0 ReactCommon: bf2888a826ceedf54b99ad1b6182d1bc4a8a3984 RNGestureHandler: a479ebd5ed4221a810967000735517df0d2db211 - rnmapbox-maps: c3ac5adc02b0ca6870758127e088ae40ab6eade0 + rnmapbox-maps: f88612089df70340b68fd7136b28f9c7efc7d7ea RNScreens: 40a2cb40a02a609938137a1e0acfbf8fc9eebf19 RNSVG: 302bfc9905bd8122f08966dc2ce2d07b7b52b9f8 RNVectorIcons: 4143ba35feebab8fdbe6bc43d1e776b393d47ac8 diff --git a/example/package.json b/example/package.json index 054b3c175..e70ded7ed 100644 --- a/example/package.json +++ b/example/package.json @@ -4,6 +4,7 @@ "private": true, "main": "./index.js", "scripts": { + "dev": "npx tsc --watch", "android": "react-native run-android", "ios": "react-native run-ios --simulator=\"iPhone SE (2nd generation)\"", "pod:install": "cd ios && pod install", @@ -19,7 +20,6 @@ "dependencies": { "@mapbox/geo-viewport": "^0.5.0", "@mapbox/mapbox-sdk": "^0.13.0", - "@rnmapbox/maps": "file:..", "@turf/along": "^6.5.0", "@turf/bbox": "^6.5.0", "@turf/bbox-polygon": "^6.5.0", @@ -81,4 +81,4 @@ } } } -} +} \ No newline at end of file diff --git a/example/tsconfig.json b/example/tsconfig.json index 2e937b215..6e7669dc1 100644 --- a/example/tsconfig.json +++ b/example/tsconfig.json @@ -14,7 +14,12 @@ "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "strict": true, - "skipLibCheck": true + "skipLibCheck": true, + "paths": { + "@rnmapbox/maps": [ + ".." + ], + } }, "files": [ "index.js", diff --git a/package.json b/package.json index 474c706c9..7649463db 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "unittest:single": "jest --testNamePattern", "lint": "eslint .", "lint:fix": "eslint . --fix", - "prepare": "npx tsc; cp -R ./assets ./lib/assets; npm run build:plugin", + "prepare": "npm run generate; npm run build:plugin", "test:plugin": "expo-module test plugin", "build:plugin": "tsc --build plugin", "lint:plugin": "eslint plugin/src/*"