Skip to content

Commit 71eb62e

Browse files
committed
feat: initial release v1.0.0
0 parents  commit 71eb62e

114 files changed

Lines changed: 25253 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# editorconfig.org
4+
5+
root = true
6+
7+
[*]
8+
9+
indent_style = space
10+
indent_size = 2
11+
12+
end_of_line = lf
13+
charset = utf-8
14+
trim_trailing_whitespace = true
15+
insert_final_newline = true

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.pbxproj -text
2+
# specific for windows script files
3+
*.bat text eol=crlf
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: 🐛 Bug report
2+
description: Report a reproducible bug or regression in this library.
3+
labels: [bug]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
# Bug report
9+
10+
👋 Hi!
11+
12+
**Please fill the following carefully before opening a new issue ❗**
13+
*(Your issue may be closed if it doesn't provide the required pieces of information)*
14+
- type: checkboxes
15+
attributes:
16+
label: Before submitting a new issue
17+
description: Please perform simple checks first.
18+
options:
19+
- label: I tested using the latest version of the library, as the bug might be already fixed.
20+
required: true
21+
- label: I tested using a [supported version](https://github.com/reactwg/react-native-releases/blob/main/docs/support.md) of react native.
22+
required: true
23+
- label: I checked for possible duplicate issues, with possible answers.
24+
required: true
25+
- type: textarea
26+
id: summary
27+
attributes:
28+
label: Bug summary
29+
description: |
30+
Provide a clear and concise description of what the bug is.
31+
If needed, you can also provide other samples: error messages / stack traces, screenshots, gifs, etc.
32+
validations:
33+
required: true
34+
- type: input
35+
id: library-version
36+
attributes:
37+
label: Library version
38+
description: What version of the library are you using?
39+
placeholder: "x.x.x"
40+
validations:
41+
required: true
42+
- type: textarea
43+
id: react-native-info
44+
attributes:
45+
label: Environment info
46+
description: Run `react-native info` in your terminal and paste the results here.
47+
render: shell
48+
validations:
49+
required: true
50+
- type: textarea
51+
id: steps-to-reproduce
52+
attributes:
53+
label: Steps to reproduce
54+
description: |
55+
You must provide a clear list of steps and code to reproduce the problem.
56+
value: |
57+
1. …
58+
2. …
59+
validations:
60+
required: true
61+
- type: input
62+
id: reproducible-example
63+
attributes:
64+
label: Reproducible example repository
65+
description: Please provide a link to a repository on GitHub with a reproducible example.
66+
validations:
67+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Feature Request 💡
4+
url: https://github.com/nasyx-rakeeb/react-native-frame-capture/discussions/new?category=ideas
5+
about: If you have a feature request, please create a new discussion on GitHub.
6+
- name: Discussions on GitHub 💬
7+
url: https://github.com/nasyx-rakeeb/react-native-frame-capture/discussions
8+
about: If this library works as promised but you need help, please ask questions there.

.github/actions/setup/action.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Setup
2+
description: Setup Node.js and install dependencies
3+
4+
runs:
5+
using: composite
6+
steps:
7+
- name: Setup Node.js
8+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
9+
with:
10+
node-version-file: .nvmrc
11+
12+
- name: Restore dependencies
13+
id: yarn-cache
14+
uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
15+
with:
16+
path: |
17+
**/node_modules
18+
.yarn/install-state.gz
19+
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}
20+
restore-keys: |
21+
${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
22+
${{ runner.os }}-yarn-
23+
24+
- name: Install dependencies
25+
if: steps.yarn-cache.outputs.cache-hit != 'true'
26+
run: yarn install --immutable
27+
shell: bash
28+
29+
- name: Cache dependencies
30+
if: steps.yarn-cache.outputs.cache-hit != 'true'
31+
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
32+
with:
33+
path: |
34+
**/node_modules
35+
.yarn/install-state.gz
36+
key: ${{ steps.yarn-cache.outputs.cache-primary-key }}

.github/workflows/ci.yml

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
merge_group:
10+
types:
11+
- checks_requested
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
lint:
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
24+
25+
- name: Setup
26+
uses: ./.github/actions/setup
27+
28+
- name: Lint files
29+
run: yarn lint
30+
31+
- name: Typecheck files
32+
run: yarn typecheck
33+
34+
test:
35+
runs-on: ubuntu-latest
36+
37+
steps:
38+
- name: Checkout
39+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
40+
41+
- name: Setup
42+
uses: ./.github/actions/setup
43+
44+
- name: Run unit tests
45+
run: yarn test --maxWorkers=2 --coverage
46+
47+
build-library:
48+
runs-on: ubuntu-latest
49+
50+
steps:
51+
- name: Checkout
52+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
53+
54+
- name: Setup
55+
uses: ./.github/actions/setup
56+
57+
- name: Build package
58+
run: yarn prepare
59+
60+
build-android:
61+
runs-on: ubuntu-latest
62+
63+
env:
64+
TURBO_CACHE_DIR: .turbo/android
65+
66+
steps:
67+
- name: Checkout
68+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
69+
70+
- name: Setup
71+
uses: ./.github/actions/setup
72+
73+
- name: Cache turborepo for Android
74+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
75+
with:
76+
path: ${{ env.TURBO_CACHE_DIR }}
77+
key: ${{ runner.os }}-turborepo-android-${{ hashFiles('yarn.lock') }}
78+
restore-keys: |
79+
${{ runner.os }}-turborepo-android-
80+
81+
- name: Check turborepo cache for Android
82+
run: |
83+
TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:android').cache.status")
84+
85+
if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
86+
echo "turbo_cache_hit=1" >> $GITHUB_ENV
87+
fi
88+
89+
- name: Install JDK
90+
if: env.turbo_cache_hit != 1
91+
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
92+
with:
93+
distribution: 'zulu'
94+
java-version: '17'
95+
96+
- name: Finalize Android SDK
97+
if: env.turbo_cache_hit != 1
98+
run: |
99+
/bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null"
100+
101+
- name: Cache Gradle
102+
if: env.turbo_cache_hit != 1
103+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
104+
with:
105+
path: |
106+
~/.gradle/wrapper
107+
~/.gradle/caches
108+
key: ${{ runner.os }}-gradle-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }}
109+
restore-keys: |
110+
${{ runner.os }}-gradle-
111+
112+
- name: Make gradlew executable
113+
run: chmod +x example/android/gradlew
114+
115+
- name: Build example for Android
116+
env:
117+
JAVA_OPTS: '-XX:MaxHeapSize=6g'
118+
run: |
119+
yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}"

.gitignore

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# OSX
2+
#
3+
.DS_Store
4+
5+
# XDE
6+
.expo/
7+
8+
# VSCode
9+
.vscode/
10+
jsconfig.json
11+
12+
# Xcode
13+
#
14+
build/
15+
*.pbxuser
16+
!default.pbxuser
17+
*.mode1v3
18+
!default.mode1v3
19+
*.mode2v3
20+
!default.mode2v3
21+
*.perspectivev3
22+
!default.perspectivev3
23+
xcuserdata
24+
*.xccheckout
25+
*.moved-aside
26+
DerivedData
27+
*.hmap
28+
*.ipa
29+
*.xcuserstate
30+
project.xcworkspace
31+
**/.xcode.env.local
32+
33+
# Android/IJ
34+
#
35+
.classpath
36+
.cxx
37+
.gradle
38+
.idea
39+
.project
40+
.settings
41+
local.properties
42+
android.iml
43+
example/android/app/src/main/assets
44+
45+
# Cocoapods
46+
#
47+
example/ios/Pods
48+
49+
# Ruby
50+
example/vendor/
51+
52+
# node.js
53+
#
54+
node_modules/
55+
npm-debug.log
56+
yarn-debug.log
57+
yarn-error.log
58+
59+
# BUCK
60+
buck-out/
61+
\.buckd/
62+
android/app/libs
63+
android/keystores/debug.keystore
64+
65+
# Yarn
66+
.yarn/*
67+
!.yarn/patches
68+
!.yarn/plugins
69+
!.yarn/releases
70+
!.yarn/sdks
71+
!.yarn/versions
72+
73+
# Expo
74+
.expo/
75+
76+
# Turborepo
77+
.turbo/
78+
79+
# generated by bob
80+
lib/
81+
82+
# React Native Codegen
83+
ios/generated
84+
android/generated
85+
86+
# React Native Nitro Modules
87+
nitrogen/

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v22.20.0

.watchmanconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

0 commit comments

Comments
 (0)