Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: change package name prefix #4

Merged
merged 2 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,24 +284,24 @@ ClickstreamAnalytics.enable();

## How to integrate and test locally

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

```bash
cd clickstream-react-native && yarn && yarn run pack
```

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

```bash
yarn add ./clickstream-react-native-0.0.1.tgz
yarn add ./aws-clickstream-react-native-0.0.1.tgz
```

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

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

### Test
Expand Down
52 changes: 26 additions & 26 deletions example/package.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
{
"name": "clickstream-react-native-example",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"build:android": "cd android && ./gradlew assembleDebug",
"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"
},
"dependencies": {
"react": "18.2.0",
"react-native": "0.73.5"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/preset-env": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@react-native/babel-preset": "0.73.21",
"@react-native/metro-config": "0.73.5",
"@react-native/typescript-config": "0.73.1",
"babel-plugin-module-resolver": "^5.0.0"
},
"engines": {
"node": ">=18"
}
"name": "clickstream-react-native-example",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"build:android": "cd android && ./gradlew assembleDebug",
"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"
},
"dependencies": {
"react": "18.2.0",
"react-native": "0.73.5"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/preset-env": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@react-native/babel-preset": "0.73.21",
"@react-native/metro-config": "0.73.5",
"@react-native/typescript-config": "0.73.1",
"babel-plugin-module-resolver": "^5.0.0"
},
"engines": {
"node": ">=18"
}
}
2 changes: 1 addition & 1 deletion example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
ScrollView,
SafeAreaView,
} from 'react-native';
import { ClickstreamAnalytics, Item } from 'clickstream-react-native';
import { ClickstreamAnalytics, Item } from '@aws/clickstream-react-native';
zhu-xiaowei marked this conversation as resolved.
Show resolved Hide resolved

export default function App() {
const initSDK = async () => {
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"name": "@aws/clickstream-react-native",
"version": "0.0.1",
"description": "ClickstreamAnalytics React Native SDK",
"main": ".lib/index.js",
"module": "./lib-esm/index.js",
"typings": "./lib-esm/index.d.ts",
"main": ".lib/src/index.js",
"module": "./lib-esm/src/index.js",
"typings": "./lib-esm/src/index.d.ts",
"react-native": "src/index.ts",
"source": "src/index",
"scripts": {
Expand Down Expand Up @@ -101,6 +101,7 @@
"ios/ClickstreamReactNative*",
"*.podspec",
"!**/__tests__",
"!**/.*"
"!**/.*",
"!**/example"
]
}
2 changes: 1 addition & 1 deletion release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ echo ${version}
regex="[0-9]\+\.[0-9]\+\.[0-9]\+"

sed -i "s/\"version\": \"${regex}\"/\"version\": \"${version}\"/g" package.json
sed -i "s/clickstream-react-native-${regex}.tgz/clickstream-react-native-${version}.tgz/g" README.md
sed -i "s/aws-clickstream-react-native-${regex}.tgz/aws-clickstream-react-native-${version}.tgz/g" README.md
72 changes: 34 additions & 38 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,36 @@
{
"compilerOptions": {
"rootDir": "src",
"paths": {
"clickstream-react-native": [
"./src/index"
]
},
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"esModuleInterop": true,
"noImplicitAny": true,
"downlevelIteration": true,
"forceConsistentCasingInFileNames": true,
"jsx": "react",
"lib": [
"es2020"
],
"moduleResolution": "node",
"noFallthroughCasesInSwitch": true,
"noImplicitReturns": true,
"noImplicitUseStrict": false,
"noStrictGenericChecks": false,
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"importHelpers": true,
"noEmitOnError": false,
"declaration": true,
"strict": true,
"target": "es2020",
"outDir": "lib"
},
"exclude": [
"**/__tests__",
"example"
]
"compilerOptions": {
"rootDir": ".",
"paths": {
"@aws/clickstream-react-native": [
"./src/index"
]
},
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"esModuleInterop": true,
"noImplicitAny": true,
"downlevelIteration": true,
"forceConsistentCasingInFileNames": true,
"jsx": "react",
"lib": [
"es2020"
],
"moduleResolution": "node",
"noFallthroughCasesInSwitch": true,
"noImplicitReturns": true,
"noImplicitUseStrict": false,
"noStrictGenericChecks": false,
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"importHelpers": true,
"noEmitOnError": false,
"declaration": true,
"strict": true,
"target": "es2020",
"outDir": "lib"
}
}
Loading