Skip to content

Commit b4de3ca

Browse files
committed
Initial commit
0 parents  commit b4de3ca

Some content is hidden

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

46 files changed

+1710
-0
lines changed

Diff for: .eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
build
2+
dist

Diff for: .gitignore

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# node files
2+
dist
3+
node_modules
4+
5+
# iOS files
6+
Pods
7+
Podfile.lock
8+
Build
9+
xcuserdata
10+
11+
# macOS files
12+
.DS_Store
13+
14+
15+
16+
# Based on Android gitignore template: https://github.com/github/gitignore/blob/HEAD/Android.gitignore
17+
18+
# Built application files
19+
*.apk
20+
*.ap_
21+
22+
# Files for the ART/Dalvik VM
23+
*.dex
24+
25+
# Java class files
26+
*.class
27+
28+
# Generated files
29+
bin
30+
gen
31+
out
32+
33+
# Gradle files
34+
.gradle
35+
build
36+
37+
# Local configuration file (sdk path, etc)
38+
local.properties
39+
40+
# Proguard folder generated by Eclipse
41+
proguard
42+
43+
# Log Files
44+
*.log
45+
46+
# Android Studio Navigation editor temp files
47+
.navigation
48+
49+
# Android Studio captures folder
50+
captures
51+
52+
# IntelliJ
53+
*.iml
54+
.idea
55+
56+
# Keystore files
57+
# Uncomment the following line if you do not want to check your keystore files in.
58+
#*.jks
59+
60+
# External native build folder generated in Android Studio 2.2 and later
61+
.externalNativeBuild

Diff for: .prettierignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
build
2+
dist

Diff for: CONTRIBUTING.md

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Contributing
2+
3+
This guide provides instructions for contributing to this Capacitor plugin.
4+
5+
## Developing
6+
7+
### Local Setup
8+
9+
1. Fork and clone the repo.
10+
1. Install the dependencies.
11+
12+
```shell
13+
npm install
14+
```
15+
16+
1. Install SwiftLint if you're on macOS.
17+
18+
```shell
19+
brew install swiftlint
20+
```
21+
22+
### Scripts
23+
24+
#### `npm run build`
25+
26+
Build the plugin web assets and generate plugin API documentation using [`@capacitor/docgen`](https://github.com/ionic-team/capacitor-docgen).
27+
28+
It will compile the TypeScript code from `src/` into ESM JavaScript in `dist/esm/`. These files are used in apps with bundlers when your plugin is imported.
29+
30+
Then, Rollup will bundle the code into a single file at `dist/plugin.js`. This file is used in apps without bundlers by including it as a script in `index.html`.
31+
32+
#### `npm run verify`
33+
34+
Build and validate the web and native projects.
35+
36+
This is useful to run in CI to verify that the plugin builds for all platforms.
37+
38+
#### `npm run lint` / `npm run fmt`
39+
40+
Check formatting and code quality, autoformat/autofix if possible.
41+
42+
This template is integrated with ESLint, Prettier, and SwiftLint. Using these tools is completely optional, but the [Capacitor Community](https://github.com/capacitor-community/) strives to have consistent code style and structure for easier cooperation.
43+
44+
## Publishing
45+
46+
There is a `prepublishOnly` hook in `package.json` which prepares the plugin before publishing, so all you need to do is run:
47+
48+
```shell
49+
npm publish
50+
```
51+
52+
> **Note**: The [`files`](https://docs.npmjs.com/cli/v7/configuring-npm/package-json#files) array in `package.json` specifies which files get published. If you rename files/directories or add files elsewhere, you may need to update it.

Diff for: DocumentReader.podspec

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
require 'json'
2+
3+
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
4+
5+
Pod::Spec.new do |s|
6+
s.name = 'DocumentReader'
7+
s.version = package['version']
8+
s.summary = package['description']
9+
s.license = package['license']
10+
s.homepage = package['repository']['url']
11+
s.author = package['author']
12+
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
13+
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
14+
s.ios.deployment_target = '12.0'
15+
s.dependency 'Capacitor'
16+
s.swift_version = '5.1'
17+
end

Diff for: README.md

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# document-reader
2+
3+
Regula Document Reader SDK allows you to read various kinds of identification documents, passports, driving licenses, ID cards, etc. All processing is performed completely offline on your device. No any data leaving your device.You can use native camera to scan the documents or image from gallery for extract all data from it.This repository contains the source code of the Document Reader API, and the sample application that demonstrates the API calls you can use to interact with the Document Reader library.
4+
5+
## Install
6+
7+
```bash
8+
npm install document-reader
9+
npx cap sync
10+
```
11+
12+
## API
13+
14+
<docgen-index>
15+
16+
* [`echo(...)`](#echo)
17+
18+
</docgen-index>
19+
20+
<docgen-api>
21+
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->
22+
23+
### echo(...)
24+
25+
```typescript
26+
echo(options: { value: string; }) => any
27+
```
28+
29+
| Param | Type |
30+
| ------------- | ------------------------------- |
31+
| **`options`** | <code>{ value: string; }</code> |
32+
33+
**Returns:** <code>any</code>
34+
35+
--------------------
36+
37+
</docgen-api>

Diff for: android/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

Diff for: android/build.gradle

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
ext {
2+
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.1'
3+
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.2.0'
4+
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.2'
5+
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.3.0'
6+
}
7+
8+
buildscript {
9+
repositories {
10+
google()
11+
jcenter()
12+
}
13+
dependencies {
14+
classpath 'com.android.tools.build:gradle:4.2.1'
15+
}
16+
}
17+
18+
apply plugin: 'com.android.library'
19+
20+
android {
21+
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 30
22+
defaultConfig {
23+
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 21
24+
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 30
25+
versionCode 1
26+
versionName "1.0"
27+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
28+
}
29+
buildTypes {
30+
release {
31+
minifyEnabled false
32+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
33+
}
34+
}
35+
lintOptions {
36+
abortOnError false
37+
}
38+
compileOptions {
39+
sourceCompatibility JavaVersion.VERSION_1_8
40+
targetCompatibility JavaVersion.VERSION_1_8
41+
}
42+
}
43+
44+
repositories {
45+
google()
46+
mavenCentral()
47+
jcenter()
48+
}
49+
50+
51+
dependencies {
52+
implementation fileTree(dir: 'libs', include: ['*.jar'])
53+
implementation project(':capacitor-android')
54+
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
55+
testImplementation "junit:junit:$junitVersion"
56+
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
57+
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
58+
}

Diff for: android/gradle.properties

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Project-wide Gradle settings.
2+
3+
# IDE (e.g. Android Studio) users:
4+
# Gradle settings configured through the IDE *will override*
5+
# any settings specified in this file.
6+
7+
# For more details on how to configure your build environment visit
8+
# http://www.gradle.org/docs/current/userguide/build_environment.html
9+
10+
# Specifies the JVM arguments used for the daemon process.
11+
# The setting is particularly useful for tweaking memory settings.
12+
org.gradle.jvmargs=-Xmx1536m
13+
14+
# When configured, Gradle will run in incubating parallel mode.
15+
# This option should only be used with decoupled projects. More details, visit
16+
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17+
# org.gradle.parallel=true
18+
19+
# AndroidX package structure to make it clearer which packages are bundled with the
20+
# Android operating system, and which are packaged with your app's APK
21+
# https://developer.android.com/topic/libraries/support-library/androidx-rn
22+
android.useAndroidX=true
23+
# Automatically convert third-party libraries to use AndroidX
24+
android.enableJetifier=true

Diff for: android/gradle/wrapper/gradle-wrapper.jar

57.8 KB
Binary file not shown.

Diff for: android/gradle/wrapper/gradle-wrapper.properties

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-all.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)