Skip to content

Commit

Permalink
feat: open source the premium modules
Browse files Browse the repository at this point in the history
  • Loading branch information
vonovak committed Dec 25, 2024
1 parent 649fa35 commit c59d487
Show file tree
Hide file tree
Showing 219 changed files with 46,077 additions and 14,437 deletions.
9 changes: 9 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
root: true,
extends: ['@react-native', 'plugin:prettier/recommended', 'plugin:jest/recommended'],
rules: {
// flags jest.config.ts as a problem
'jest/no-jest-import': 'off',
},
ignorePatterns: ['**/lib/*', 'node_modules/*', '**/build/*'],
}
5 changes: 4 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
*.pbxproj -text
# specific for windows script files
*.bat text eol=crlf
*.bat text eol=crlf

# https://stackoverflow.com/a/51564689/2070942 to avoid git grep result
.yarn/**/*.* binary
49 changes: 49 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Android build

on:
push:
branches:
- main
paths:
- '.github/workflows/android.yml'
- 'packages/**/android**'
pull_request:
paths:
- '.github/workflows/android.yml'
- 'packages/**/android/**'

jobs:
android-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js lts
uses: actions/setup-node@v4
with:
node-version: lts/*
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Install dependencies
run: yarn install
- name: Build android example app on old architecture
run: ./gradlew app:assembleDebug -PnewArchEnabled=false
working-directory: packages/example/android
android-build-new-arch:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js lts
uses: actions/setup-node@v4
with:
node-version: lts/*
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Install dependencies
run: yarn install
- name: Build android example app on new architecture
run: ./gradlew app:assembleDebug -PnewArchEnabled=true
working-directory: packages/example/android
53 changes: 53 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Deploy to GitHub Pages

on:
pull_request:
branches: [main]
push:
branches: [main]

permissions:
contents: write

defaults:
run:
working-directory: ./docs

jobs:
test-deploy:
if: github.event_name != 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: yarn
- name: Install dependencies and build website
run: |
yarn install
yarn build
deploy:
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: yarn
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
- name: Deploy to GitHub Pages
env:
USE_SSH: true
run: |
git config --global user.email "[email protected]"
git config --global user.name "Vojtech Novak"
yarn install
yarn deploy
57 changes: 57 additions & 0 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: iOS build

on:
push:
branches:
- main
paths:
- '.github/workflows/ios.yml'
- 'packages/**/ios**'
pull_request:
paths:
- '.github/workflows/ios.yml'
- 'packages/**/ios**'

jobs:
ios-build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js lts
uses: actions/setup-node@v4
with:
node-version: lts/*
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
working-directory: packages/example/ios
bundler-cache: true
- name: Install dependencies
run: yarn install
- name: Install pods
run: RCT_NEW_ARCH_ENABLED=0 npx pod-install
working-directory: packages/example/ios
- name: Build ios example app on old architecture
run: xcodebuild -scheme ReactTestApp -workspace document-picker-example.xcworkspace ONLY_ACTIVE_ARCH=NO -sdk iphonesimulator -configuration Debug
working-directory: packages/example/ios
ios-build-new-arch:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js lts
uses: actions/setup-node@v4
with:
node-version: lts/*
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
working-directory: packages/example/ios
bundler-cache: true
- name: Install dependencies
run: yarn install
- name: Install pods for new arch
run: RCT_NEW_ARCH_ENABLED=1 npx pod-install
working-directory: packages/example/ios
- name: Build ios example app on new architecture
run: xcodebuild -scheme ReactTestApp -workspace document-picker-example.xcworkspace ONLY_ACTIVE_ARCH=NO -sdk iphonesimulator -configuration Debug
working-directory: packages/example/ios
54 changes: 23 additions & 31 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,44 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: Node.js CI
name: test and publish

on:
push:
branches: [master]
branches: [master, main]
pull_request:
branches: [master]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: yarn install --frozen-lockfile
- run: yarn lint && yarn typescript
env:
CI: true
# release:
node-version: lts/*
- run: yarn install
- run: yarn typescript
- run: yarn prettier:check
- run: yarn lint
- run: yarn test
- run: yarn build

# publish-npm:
# needs: build
# if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
# runs-on: ubuntu-latest
# if: github.ref == 'refs/heads/master'
# steps:
# - uses: actions/checkout@v2
# - uses: actions/checkout@v3
# with:
# fetch-depth: 0
# - name: git config
# run: |
# git config user.name "${GITHUB_ACTOR}"
# git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
# - run: |
# echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
# npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
# env:
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# - uses: actions/setup-node@v3
# with:
# node-version: lts/*
# - run: yarn install --frozen-lockfile
# - run: yarn prepare && yarn release
# - run: yarn release
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ android/keystores/debug.keystore
# generated by bob
lib/

# https://github.com/yarnpkg/berry/issues/454#issuecomment-530312089
.yarn/*
!.yarn/releases
!.yarn/plugins

# gh-md-toc
docs/gh-md-toc
14 changes: 14 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Ignore artifacts:
**/build
**/dist
**/coverage
**/.next
**/.vscode
**/.expo
**/ios
**/android
docs/.docusaurus

# these are auto-generated
docs/docs/doc-picker-api/index.md
docs/docs/doc-viewer-api/index.md
Loading

0 comments on commit c59d487

Please sign in to comment.