Skip to content

Commit 818767c

Browse files
authored
chore: change package name prefix (#4)
1 parent 2bbecd1 commit 818767c

File tree

6 files changed

+72
-75
lines changed

6 files changed

+72
-75
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -284,24 +284,24 @@ ClickstreamAnalytics.enable();
284284

285285
## How to integrate and test locally
286286

287-
Clone this repository locally and execute the following script to generate `clickstream-react-native-0.0.1.tgz` zip
287+
Clone this repository locally and execute the following script to generate `aws-clickstream-react-native-0.0.1.tgz` zip
288288
package, which will be located in the project root folder.
289289

290290
```bash
291291
cd clickstream-react-native && yarn && yarn run pack
292292
```
293293

294-
Copy the `clickstream-react-native-0.0.1.tgz` into your project, then execute the script in your project root folder to
294+
Copy the `aws-clickstream-react-native-0.0.1.tgz` into your project, then execute the script in your project root folder to
295295
install the SDK.
296296

297297
```bash
298-
yarn add ./clickstream-react-native-0.0.1.tgz
298+
yarn add ./aws-clickstream-react-native-0.0.1.tgz
299299
```
300300

301-
**Note**: Please correct the SDK version and change the path to where the `clickstream-react-native-0.0.1.tgz` file is
301+
**Note**: Please correct the SDK version and change the path to where the `aws-clickstream-react-native-0.0.1.tgz` file is
302302
located.
303303

304-
You can also find the `clickstream-react-native-0.0.1.tgz` file in
304+
You can also find the `aws-clickstream-react-native-0.0.1.tgz` file in
305305
the [Release](https://github.com/awslabs/clickstream-react-native/releases) page.
306306

307307
### Test

example/package.json

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
{
2-
"name": "clickstream-react-native-example",
3-
"version": "0.0.1",
4-
"private": true,
5-
"scripts": {
6-
"android": "react-native run-android",
7-
"ios": "react-native run-ios",
8-
"start": "react-native start",
9-
"build:android": "cd android && ./gradlew assembleDebug",
10-
"build:ios": "cd ios && xcodebuild -workspace ClickstreamReactNativeExample.xcworkspace -scheme ClickstreamReactNativeExample -sdk iphonesimulator -configuration Release -destination generic/platform=iOS CODE_SIGN_IDENTITY=\"\" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO clean archive | xcpretty"
11-
},
12-
"dependencies": {
13-
"react": "18.2.0",
14-
"react-native": "0.73.5"
15-
},
16-
"devDependencies": {
17-
"@babel/core": "^7.20.0",
18-
"@babel/preset-env": "^7.20.0",
19-
"@babel/runtime": "^7.20.0",
20-
"@react-native/babel-preset": "0.73.21",
21-
"@react-native/metro-config": "0.73.5",
22-
"@react-native/typescript-config": "0.73.1",
23-
"babel-plugin-module-resolver": "^5.0.0"
24-
},
25-
"engines": {
26-
"node": ">=18"
27-
}
2+
"name": "clickstream-react-native-example",
3+
"version": "0.0.1",
4+
"private": true,
5+
"scripts": {
6+
"android": "react-native run-android",
7+
"ios": "react-native run-ios",
8+
"start": "react-native start",
9+
"build:android": "cd android && ./gradlew assembleDebug",
10+
"build:ios": "cd ios && xcodebuild -workspace ClickstreamReactNativeExample.xcworkspace -scheme ClickstreamReactNativeExample -sdk iphonesimulator -configuration Release -destination generic/platform=iOS CODE_SIGN_IDENTITY=\"\" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO clean archive | xcpretty"
11+
},
12+
"dependencies": {
13+
"react": "18.2.0",
14+
"react-native": "0.73.5"
15+
},
16+
"devDependencies": {
17+
"@babel/core": "^7.20.0",
18+
"@babel/preset-env": "^7.20.0",
19+
"@babel/runtime": "^7.20.0",
20+
"@react-native/babel-preset": "0.73.21",
21+
"@react-native/metro-config": "0.73.5",
22+
"@react-native/typescript-config": "0.73.1",
23+
"babel-plugin-module-resolver": "^5.0.0"
24+
},
25+
"engines": {
26+
"node": ">=18"
27+
}
2828
}

example/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
ScrollView,
88
SafeAreaView,
99
} from 'react-native';
10-
import { ClickstreamAnalytics, Item } from 'clickstream-react-native';
10+
import { ClickstreamAnalytics, Item } from '@aws/clickstream-react-native';
1111

1212
export default function App() {
1313
const initSDK = async () => {

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"name": "@aws/clickstream-react-native",
33
"version": "0.0.1",
44
"description": "ClickstreamAnalytics React Native SDK",
5-
"main": ".lib/index.js",
6-
"module": "./lib-esm/index.js",
7-
"typings": "./lib-esm/index.d.ts",
5+
"main": ".lib/src/index.js",
6+
"module": "./lib-esm/src/index.js",
7+
"typings": "./lib-esm/src/index.d.ts",
88
"react-native": "src/index.ts",
99
"source": "src/index",
1010
"scripts": {
@@ -101,6 +101,7 @@
101101
"ios/ClickstreamReactNative*",
102102
"*.podspec",
103103
"!**/__tests__",
104-
"!**/.*"
104+
"!**/.*",
105+
"!**/example"
105106
]
106107
}

release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ echo ${version}
55
regex="[0-9]\+\.[0-9]\+\.[0-9]\+"
66

77
sed -i "s/\"version\": \"${regex}\"/\"version\": \"${version}\"/g" package.json
8-
sed -i "s/clickstream-react-native-${regex}.tgz/clickstream-react-native-${version}.tgz/g" README.md
8+
sed -i "s/aws-clickstream-react-native-${regex}.tgz/aws-clickstream-react-native-${version}.tgz/g" README.md

tsconfig.json

Lines changed: 34 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,36 @@
11
{
2-
"compilerOptions": {
3-
"rootDir": "src",
4-
"paths": {
5-
"clickstream-react-native": [
6-
"./src/index"
7-
]
8-
},
9-
"allowUnreachableCode": false,
10-
"allowUnusedLabels": false,
11-
"esModuleInterop": true,
12-
"noImplicitAny": true,
13-
"downlevelIteration": true,
14-
"forceConsistentCasingInFileNames": true,
15-
"jsx": "react",
16-
"lib": [
17-
"es2020"
18-
],
19-
"moduleResolution": "node",
20-
"noFallthroughCasesInSwitch": true,
21-
"noImplicitReturns": true,
22-
"noImplicitUseStrict": false,
23-
"noStrictGenericChecks": false,
24-
"noUncheckedIndexedAccess": true,
25-
"noUnusedLocals": true,
26-
"noUnusedParameters": true,
27-
"resolveJsonModule": true,
28-
"skipLibCheck": true,
29-
"importHelpers": true,
30-
"noEmitOnError": false,
31-
"declaration": true,
32-
"strict": true,
33-
"target": "es2020",
34-
"outDir": "lib"
35-
},
36-
"exclude": [
37-
"**/__tests__",
38-
"example"
39-
]
2+
"compilerOptions": {
3+
"rootDir": ".",
4+
"paths": {
5+
"@aws/clickstream-react-native": [
6+
"./src/index"
7+
]
8+
},
9+
"allowUnreachableCode": false,
10+
"allowUnusedLabels": false,
11+
"esModuleInterop": true,
12+
"noImplicitAny": true,
13+
"downlevelIteration": true,
14+
"forceConsistentCasingInFileNames": true,
15+
"jsx": "react",
16+
"lib": [
17+
"es2020"
18+
],
19+
"moduleResolution": "node",
20+
"noFallthroughCasesInSwitch": true,
21+
"noImplicitReturns": true,
22+
"noImplicitUseStrict": false,
23+
"noStrictGenericChecks": false,
24+
"noUncheckedIndexedAccess": true,
25+
"noUnusedLocals": true,
26+
"noUnusedParameters": true,
27+
"resolveJsonModule": true,
28+
"skipLibCheck": true,
29+
"importHelpers": true,
30+
"noEmitOnError": false,
31+
"declaration": true,
32+
"strict": true,
33+
"target": "es2020",
34+
"outDir": "lib"
35+
}
4036
}

0 commit comments

Comments
 (0)