diff --git a/.yarnrc.yml b/.yarnrc.yml index d95b48b..bdab70a 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -4,8 +4,8 @@ nmHoistingLimits: workspaces plugins: - path: scripts/pod-install.cjs - path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs - spec: "@yarnpkg/plugin-interactive-tools" + spec: '@yarnpkg/plugin-interactive-tools' - path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs - spec: "@yarnpkg/plugin-workspace-tools" + spec: '@yarnpkg/plugin-workspace-tools' yarnPath: .yarn/releases/yarn-3.6.1.cjs diff --git a/CHANGELOG.md b/CHANGELOG.md index f5950e6..c56f1b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [0.2.3](https://github.com/AndrewDongminYoo/react-native-step-counter/compare/v0.2.2...v0.2.3) (2023-10-15) + +### Chore Changes + +- Add Example App Link and Notices (walking_tracker) + ## [0.2.2](https://github.com/AndrewDongminYoo/react-native-step-counter/compare/v0.2.1...v0.2.2) (2023-10-14) ### Bug Fixes diff --git a/README.kr.md b/README.kr.md index 138ba3b..85fa51e 100644 --- a/README.kr.md +++ b/README.kr.md @@ -25,6 +25,12 @@ pnpm add react-native-step-counter π£ 리μ‘νΈ λ€μ΄ν°λΈμ μλ‘μ΄ μν€ν μ³λ₯Ό μ¬μ©νκΈ° λλ¬Έμ μνμ§ μλ κ²½μ° μλ κ°μ΄λλ₯Ό λ°λΌμΌ ν©λλ€. μ΄λ―Έ New Architectureλ₯Ό νμ±ννκ³ μ¬μ μ€μ μ λ§μΉ μνλΌλ©΄, [λ€μ λ¨κ³](#android)λ‘ λμ΄κ°λλ€. +## λ 립 μ±μμ μ¬μ©ν μ μλ 리μΌμλ μμ μ±μ μνμλ λΆλ€μ [walking_tracker](https://github.com/AndrewDongminYoo/walking_tracker) μ°Έκ³ + +μ μ 첫 NPM μ€νμμ€ ν¨ν€μ§μ λ§μ κ΄μ¬ κ°μ Έμ£Όμ μ κ°μ¬ν©λλ€! λ°°ν¬ μ΄ν μ¬μ©μ λΆλ€λ‘λΆν° νΉν 리μ‘νΈ λ€μ΄ν°λΈ μ κ· μν€ν μ³ νμνΈνμ κ΄ν μ΄μ μ λ³΄κ° λ§μμ΅λλ€. μ λ°μ μΌλ‘ μ½λ ꡬ쑰λ₯Ό κ³ μΉλ©΄μ ν΄λΉ μ΄μλ₯Ό μ΄λ μ λ λ§λ¬΄λ¦¬νμ΅λλ€. [create-react-native-library](https://github.com/callstack/react-native-builder-bob)μ ν νλ¦ΏμΌλ‘λΆν° μμ±λλ example ν΄λμ μμ μ±μ μμ±νκ³ μ λ κ°λ° μ€μ μ¬μ©ν΄μμ§λ§, ν΄λΉ ν νλ¦Ώμ ꡬ쑰 μ example ν΄λκ° νλμ standalone μ ν리μΌμ΄μ 보λ€λ μ 체 κ°λ° νλ‘μΈμ€μ ν λΆλΆμ λ§‘κ³ μλ κ΄κ³λ‘, μ€μ μ¬μ©νλ μ±μμ μ°Έκ³ νκΈ°μλ λΆμ ν©ν μ½λλ€μ΄ λ€μ ν¬ν¨λμ΄ μλ μ μ λ°κ²¬νμ΅λλ€. μ΄ λλ¬Έμ λΉκ³΅μμ μΌλ‘ μλΈ λ¦¬ν¬μ§ν λ¦¬λ‘ κ°λ° μ€μ΄λ example μ ν리μΌμ΄μ μ [walking_tracker](https://github.com/AndrewDongminYoo/walking_tracker)λΌλ μ΄λ¦μ 리ν¬μ§ν λ¦¬λ‘ λ 립 κ΄λ¦¬νλ €κ³ ν©λλ€. μ΄ μ μ κΌ μ°Έκ³ ν΄ μ£Όμλ©΄ κ°μ¬νκ² μ΅λλ€. + +--- + ## λΌμ΄λΈλ¬λ¦¬λ₯Ό μμ‘΄μ±μ μΆκ°νκΈ° μ μ¬μ μΈν - 리μ‘νΈ λ€μ΄ν°λΈ μ ν리μΌμ΄μ κ³΅ν΅ λ³κ²½μ¬ν μ μ diff --git a/README.md b/README.md index faee69c..028053a 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,12 @@ Native modules will automatically connect after React Native 0.60 version. So yo π£ if you are using the legacy architecture, you need to follow the guide below. otherwise, you can [skip](#android) next step. +## IF YOU WANT SEE A DEMO IN STANDALONE REACT-NATIVE APPLICATION, SEE [WALKING_TRACKER EXAMPLE](https://github.com/AndrewDongminYoo/walking_tracker) REPO + +Thank you for your interest in my first NPM open source package! I've received a lot of issue reports on various issues, especially the react-native's `NEW ARCHITECTURE` backwards compatibility, and I've more or less finalized those issues by fixing the code structure across the board. We had generated an example folder from [create-react-native-library](https://github.com/callstack/react-native-builder-bob)'s template and used it for this project, but due to the structure of that template, we found that the example folder contained a lot of code that was not suitable for reference in a working app, as it was part of the overall development process rather than a standalone application. For this reason, I'm going to independently manage the example application, which we had been developing informally as a sub-repository, as a repository named [walking_tracker](https://github.com/AndrewDongminYoo/walking_tracker). I'd really appreciate it if you could take this into consideration. + +--- + ## Setup the New Architecture - Applying a new architecture to React Native applications (Common) diff --git a/android/src/main/java/com/stepcounter/StepCounterModule.kt b/android/src/main/java/com/stepcounter/StepCounterModule.kt index 238ee90..afa2ad5 100644 --- a/android/src/main/java/com/stepcounter/StepCounterModule.kt +++ b/android/src/main/java/com/stepcounter/StepCounterModule.kt @@ -137,7 +137,7 @@ class StepCounterModule internal constructor(context: ReactApplicationContext) : /** * StepCounterPackage requires this property for the module. - * @return the name of the module. usually "RNStepCounter". + * @return the name of the module. usually "StepCounter". */ override fun getName(): String = NAME diff --git a/docs/NativeStepCounter.js.html b/docs/NativeStepCounter.js.html index 05a76bd..92e1cb9 100644 --- a/docs/NativeStepCounter.js.html +++ b/docs/NativeStepCounter.js.html @@ -32,7 +32,7 @@
if (!RNStepCounter.startStepCounterUpdate) {
+ class="prettyprint">if (!StepCounter.startStepCounterUpdate) {
throw new UnavailabilityError(NativeModuleName, eventName);
}
diff --git a/docs/global.html b/docs/global.html
index 029e2a8..5acc8dd 100644
--- a/docs/global.html
+++ b/docs/global.html
@@ -32,7 +32,7 @@ import { RNStepCounter } from '@dongminyu/react-native-step-counter';
+ class="prettyprint">import { StepCounter } from '@dongminyu/react-native-step-counter';
```ts
- if (!RNStepCounter.startStepCounterUpdate) {
+ if (!StepCounter.startStepCounterUpdate) {
throw new UnavailabilityError(NativeModuleName, eventName);
}
```
diff --git a/example/src/LogCat.tsx b/example/src/LogCat.tsx
index d2b8f83..7bf788b 100644
--- a/example/src/LogCat.tsx
+++ b/example/src/LogCat.tsx
@@ -3,7 +3,7 @@ import { View, Text, StyleSheet, ScrollView } from 'react-native';
import type { EmitterSubscription } from 'react-native';
import { NativeEventEmitter, NativeModules } from 'react-native';
-const eventEmitter = new NativeEventEmitter(NativeModules.RNStepCounter);
+const eventEmitter = new NativeEventEmitter(NativeModules.StepCounter);
/**
* @description A component that displays the logs from the native module.
diff --git a/package.json b/package.json
index a70d641..031946b 100644
--- a/package.json
+++ b/package.json
@@ -1,8 +1,7 @@
{
"name": "@dongminyu/react-native-step-counter",
"displayName": "react-native-step-counter",
- "version": "0.2.2",
- "private": false,
+ "version": "0.2.3",
"summary": "It is a multi-platform library that combines CoreMotionSensor from iOS with SensorEventListener from Android.",
"description": "This library provides an interface for tracking the number of steps taken by the user in a React Native app.",
"main": "lib/commonjs/index.js",
diff --git a/src/NativeStepCounter.ts b/src/NativeStepCounter.ts
index 49bdd16..1aa58e7 100644
--- a/src/NativeStepCounter.ts
+++ b/src/NativeStepCounter.ts
@@ -22,8 +22,8 @@ export type StepCountData = {
floorsDescended?: number; // number of floors descended (iOS only)
};
-export const NAME = 'RNStepCounter';
-export const VERSION = '0.2.1';
+export const NAME = 'StepCounter';
+export const VERSION = '0.2.3';
export const eventName = 'StepCounter.stepCounterUpdate';
export interface Spec extends TurboModule {
diff --git a/src/index.tsx b/src/index.tsx
index c915a6c..3b94467 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -62,7 +62,7 @@ const StepCounterModule = isTurboModuleEnabled
* counterType - The type of counter used to count the steps.
* @throws {Error} LINKING_ERROR - Throws Error If global variable turboModuleProxy is undefined.
* @example
- * import { RNStepCounter } from '@dongminyu/react-native-step-counter';
+ * import { StepCounter } from '@dongminyu/react-native-step-counter';
*/
const StepCounter = (
StepCounterModule
@@ -114,7 +114,7 @@ export function parseStepData(data: StepCountData): ParsedStepCountData {
* @param {string} propertyName The name of the property.
* @returns {Error} The error.
* @example
- * if (!RNStepCounter.startStepCounterUpdate) {
+ * if (!StepCounter.startStepCounterUpdate) {
* throw new UnavailabilityError(NativeModuleName, eventName);
* }
*/