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
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ We want this community to be friendly and respectful to each other. Please follo

This project is a monorepo managed using [Bun workspaces](https://bun.sh/docs/install/workspaces). It contains the following packages:

- The library package in the root directory.
- The library package in the `package/` directory.
- An example app in the `example/` directory.

To get started, install Bun 1.3.1 and the version of [Node.js](https://nodejs.org/) specified in [`.nvmrc`](./.nvmrc).
Expand Down
13 changes: 1 addition & 12 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1 @@
module.exports = {
overrides: [
{
exclude: /\/node_modules\//,
presets: ['module:react-native-builder-bob/babel-preset'],
},
{
include: /\/node_modules\//,
presets: ['module:@react-native/babel-preset'],
},
],
};
module.exports = require('./package/babel.config');
18 changes: 13 additions & 5 deletions bun.lock

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

2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ export default defineConfig([
},
},
{
ignores: ['node_modules/', 'lib/'],
ignores: ['node_modules/', 'lib/', 'package/lib/'],
},
]);
4 changes: 2 additions & 2 deletions example/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const path = require('path');
const { getConfig } = require('react-native-builder-bob/babel-config');
const pkg = require('../package.json');
const pkg = require('../package/package.json');

const root = path.resolve(__dirname, '..');
const root = path.resolve(__dirname, '../package');

module.exports = function (api) {
api.cache(true);
Expand Down
1 change: 1 addition & 0 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"react-native-gesture-handler": "^2.30.0",
"react-native-haptic-feedback": "^2.3.4",
"react-native-pressable-scale": "^2.1.0",
"react-native-graph": "workspace:*",
"react-native-reanimated": "^4.2.3",
"react-native-web": "~0.21.0",
"react-native-worklets": "^0.7.4"
Expand Down
2 changes: 1 addition & 1 deletion example/src/data/GraphData.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { GraphPoint } from '../../../src/LineGraphProps';
import type { GraphPoint } from '../../../package/src/LineGraphProps';
import gaussian from 'gaussian';

function weightedRandom(mean: number, variance: number): number {
Expand Down
2 changes: 1 addition & 1 deletion example/src/screens/GraphPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useCallback, useMemo, useState } from 'react';
import { View, StyleSheet, Text, Button, ScrollView } from 'react-native';
import { LineGraph } from 'react-native-graph';
// import StaticSafeAreaInsets from 'react-native-static-safe-area-insets'
import type { GraphRange } from '../../../src/LineGraphProps';
import type { GraphRange } from '../../../package/src/LineGraphProps';
import { SelectionDot } from '../components/CustomSelectionDot';
import { Toggle } from '../components/Toggle';
import {
Expand Down
143 changes: 11 additions & 132 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,80 +1,22 @@
{
"name": "react-native-graph",
"name": "react-native-graph-workspace",
"version": "1.3.0",
"description": "📈 Beautiful, high-performance Graphs and Charts for React Native",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
"exports": {
".": {
"source": "./src/index.ts",
"types": "./lib/typescript/src/index.d.ts",
"default": "./lib/module/index.js"
},
"./package.json": "./package.json"
},
"files": [
"src",
"lib",
"android",
"ios",
"cpp",
"*.podspec",
"react-native.config.js",
"!ios/build",
"!android/build",
"!android/gradle",
"!android/gradlew",
"!android/gradlew.bat",
"!android/local.properties",
"!**/__tests__",
"!**/__fixtures__",
"!**/__mocks__",
"!**/.*"
"private": true,
"packageManager": "bun@1.3.1",
"workspaces": [
"package",
"example"
],
"scripts": {
"graph": "bun --cwd package",
"example": "bun --cwd example",
"clean": "del-cli lib",
"prepare": "bob build",
"clean": "bun graph clean",
"prepare": "bun graph prepare",
"typecheck": "tsc",
"release": "release-it --only-version",
"test": "jest",
"release": "bun graph release",
"test": "bun graph test",
"lint": "eslint \"**/*.{js,ts,tsx}\""
},
"keywords": [
"react-native",
"ios",
"android",
"react",
"svg",
"chart",
"charts",
"library",
"performance",
"react-native",
"crypto",
"graph",
"animation",
"graphs",
"stock",
"beautiful",
"wallet",
"animated",
"skia",
"linegraph"
],
"repository": {
"type": "git",
"url": "git+https://github.com/margelo/react-native-graph.git"
},
"author": "Marc Rousavy <me@mrousavy.com> (https://github.com/mrousavy)",
"license": "MIT",
"bugs": {
"url": "https://github.com/margelo/react-native-graph/issues"
},
"homepage": "https://github.com/margelo/react-native-graph#readme",
"publishConfig": {
"registry": "https://registry.npmjs.org/"
},
"devDependencies": {
"@eslint/compat": "^1.3.2",
"@eslint/eslintrc": "^3.3.1",
Expand All @@ -101,74 +43,11 @@
"turbo": "^2.5.6",
"typescript": "^5.9.2"
},
"peerDependencies": {
"react": "*",
"react-native": "*",
"react-native-reanimated": "*"
},
"workspaces": [
"example"
],
"packageManager": "bun@1.3.1",
"react-native-builder-bob": {
"source": "src",
"output": "lib",
"targets": [
[
"module",
{
"esm": true
}
],
[
"typescript",
{
"project": "tsconfig.build.json"
}
]
]
},
"release-it": {
"git": {
"commitMessage": "chore: release ${version}",
"tagName": "v${version}"
},
"npm": {
"publish": true
},
"github": {
"release": true
},
"plugins": {
"@release-it/conventional-changelog": {
"preset": {
"name": "angular"
}
}
}
},
"jest": {
"preset": "react-native",
"modulePathIgnorePatterns": [
"<rootDir>/example/node_modules",
"<rootDir>/lib/"
]
},
"prettier": {
"quoteProps": "consistent",
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"useTabs": false
},
"create-react-native-library": {
"type": "library",
"languages": "js",
"tools": [
"release-it",
"jest",
"eslint"
],
"version": "0.57.2"
}
}
20 changes: 20 additions & 0 deletions package/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
MIT License

Copyright (c) 2026 Marc Rousavy
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading
Loading