Skip to content
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
12 changes: 1 addition & 11 deletions app.plugin.js
Original file line number Diff line number Diff line change
@@ -1,11 +1 @@
const { createRunOncePlugin } = require("expo/config-plugins");

const withMotionActivityPermissions =
require("./config-plugin/withMotionActivityPermissions").default;
const pkg = require("./package.json");

module.exports = createRunOncePlugin(
withMotionActivityPermissions,
pkg.name,
pkg.version,
);
module.exports = require("./plugin/build");
3 changes: 2 additions & 1 deletion example/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
},
"web": {
"favicon": "./assets/favicon.png"
}
},
"plugins": ["../app.plugin.js"]
}
}
13 changes: 12 additions & 1 deletion example/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"dependencies": {
"expo": "~51.0.28",
"react": "18.2.0",
"react-native": "0.74.5"
"react-native": "0.74.5",
"react-native-motion-activity-tracker": "^0.1.3"
},
"devDependencies": {
"@babel/core": "^7.20.0",
Expand Down
File renamed without changes.
9 changes: 9 additions & 0 deletions plugin/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "expo-module-scripts/tsconfig.plugin",
"compilerOptions": {
"outDir": "build",
"rootDir": "src"
},
"include": ["./src"],
"exclude": ["**/__mocks__/*", "**/__tests__/*"]
}
2 changes: 1 addition & 1 deletion tests/withMotionActivityPermissions.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { withInfoPlist, withAndroidManifest } from "@expo/config-plugins";
import type { ExpoConfig } from "@expo/config-types";

import withMotionActivityPermissions from "../config-plugin/withMotionActivityPermissions";
import withMotionActivityPermissions from "../plugin/src/index";

interface ExpoConfigWithModResults extends ExpoConfig {
modResults?: {
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"compilerOptions": {
"outDir": "./build"
},
"include": ["./src", "./tests"],
"include": ["./src"],
"exclude": ["**/__mocks__/*", "**/__tests__/*"]
}
Loading