Skip to content

Commit 607fbdc

Browse files
committed
chore: version 0.1.0
0 parents  commit 607fbdc

Some content is hidden

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

50 files changed

+15102
-0
lines changed

.eslintrc.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"root": true,
3+
"extends": [
4+
"@react-native-community/eslint-config"
5+
],
6+
"ignorePatterns": [
7+
"lib/**/*",
8+
"node_modules/**/*"
9+
],
10+
"rules": {
11+
"semi": "off",
12+
"@typescript-eslint/no-unused-vars": "warn"
13+
}
14+
}

.github/actions/setup/action.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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@v3
9+
10+
- name: Cache dependencies
11+
id: yarn-cache
12+
uses: actions/cache@v3
13+
with:
14+
path: |
15+
**/node_modules
16+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/package.json') }}
17+
restore-keys: |
18+
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
19+
${{ runner.os }}-yarn-
20+
21+
- name: Install dependencies
22+
if: steps.yarn-cache.outputs.cache-hit != 'true'
23+
run: |
24+
yarn install --cwd example --frozen-lockfile
25+
yarn install --frozen-lockfile
26+
shell: bash

.github/workflows/ci.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
10+
jobs:
11+
lint:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v3
16+
17+
- name: Setup
18+
uses: ./.github/actions/setup
19+
20+
- name: Lint files
21+
run: yarn lint
22+
23+
- name: Typecheck files
24+
run: yarn typecheck
25+
26+
build-library:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v3
31+
32+
- name: Setup
33+
uses: ./.github/actions/setup
34+
35+
- name: Build package
36+
run: yarn prepack
37+
38+
build-macos:
39+
runs-on: macos-latest
40+
steps:
41+
- name: Checkout
42+
uses: actions/checkout@v3
43+
44+
- name: Setup
45+
uses: ./.github/actions/setup
46+
47+
- name: Cache cocoapods
48+
id: cocoapods-cache
49+
uses: actions/cache@v3
50+
with:
51+
path: |
52+
**/macos/Pods
53+
key: ${{ runner.os }}-cocoapods-${{ hashFiles('example/macos/Podfile.lock') }}
54+
restore-keys: |
55+
${{ runner.os }}-cocoapods-
56+
57+
- name: Install cocoapods
58+
run: |
59+
yarn example pods
60+
env:
61+
NO_FLIPPER: 1
62+
63+
- name: Build example for MacOS
64+
run: |
65+
yarn run build:macos

.gitignore

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# OSX
2+
.DS_Store
3+
4+
# Xcode
5+
build/
6+
*.pbxuser
7+
!default.pbxuser
8+
*.mode1v3
9+
!default.mode1v3
10+
*.mode2v3
11+
!default.mode2v3
12+
*.perspectivev3
13+
!default.perspectivev3
14+
xcuserdata
15+
*.xccheckout
16+
*.moved-aside
17+
DerivedData
18+
*.hmap
19+
*.ipa
20+
*.xcuserstate
21+
project.xcworkspace
22+
23+
# Cocoapods
24+
example/ios/Pods
25+
example/macos/Pods
26+
27+
# Ruby
28+
example/vendor/
29+
30+
# Node
31+
.expo/
32+
lib/
33+
node_modules/
34+
yarn-debug.log
35+
yarn-error.log
36+
**/.yarn/install-state.gz
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/index.js b/index.js
2+
index bb5e2e32c94bf0279a0408415d1a41545cb39c54..d0587162c125623828c82dfd4ae31d1a9aa16b4c 100644
3+
--- a/index.js
4+
+++ b/index.js
5+
@@ -16,8 +16,6 @@ module.exports = {
6+
sourceType: 'module',
7+
},
8+
9+
- extends: ['plugin:prettier/recommended'],
10+
-
11+
plugins: [
12+
'eslint-comments',
13+
'react',

.yarnrc.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
compressionLevel: 0
2+
3+
enableGlobalCache: true
4+
5+
enableTelemetry: false
6+
7+
logFilters:
8+
- code: YN0002
9+
level: discard
10+
- code: YN0060
11+
level: discard
12+
- code: YN0006
13+
level: discard
14+
- code: YN0076
15+
level: discard
16+
- code: YN0013
17+
level: discard
18+
- code: YN0007
19+
level: discard
20+
21+
nodeLinker: node-modules
22+
23+
nmHoistingLimits: workspaces

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Victor Henrion <bonjour@victor.id> (https://github.com/victorhenrion)
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# react-native-document-picker-macos
2+
3+
A file and directory picker for React Native macOS.
4+
5+
![NPM Version](https://img.shields.io/npm/v/react-native-document-picker-macos)
6+
7+
## Installation
8+
9+
```bash
10+
npm i react-native-document-picker-macos
11+
pod install --project-directory=macos
12+
```
13+
14+
## Contributing
15+
16+
This package is open to contributions of all kinds.

RNDocumentPicker.podspec

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
require "json"
2+
3+
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4+
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
5+
6+
Pod::Spec.new do |s|
7+
s.name = "RNDocumentPicker"
8+
s.version = package["version"]
9+
s.summary = package["description"]
10+
s.homepage = package["homepage"]
11+
s.license = package["license"]
12+
s.authors = package["author"]
13+
14+
s.platforms = { :osx => "10.15" }
15+
s.source = { :git => "https://github.com/victorhenrion/react-native-document-picker-macos.git", :tag => "#{s.version}" }
16+
17+
s.source_files = "macos/**/*.{h,m,mm}"
18+
19+
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
20+
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
21+
if respond_to?(:install_modules_dependencies, true)
22+
install_modules_dependencies(s)
23+
else
24+
s.dependency "React-Core"
25+
26+
# Don't install the dependencies when we run `pod install` in the old architecture.
27+
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
28+
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
29+
s.pod_target_xcconfig = {
30+
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
31+
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
32+
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
33+
}
34+
s.dependency "React-RCTFabric"
35+
s.dependency "React-Codegen"
36+
s.dependency "RCT-Folly"
37+
s.dependency "RCTRequired"
38+
s.dependency "RCTTypeSafety"
39+
s.dependency "ReactCommon/turbomodule/core"
40+
end
41+
end
42+
end

babel.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: ['module:@react-native/babel-preset'],
3+
}

0 commit comments

Comments
 (0)