Skip to content

Commit 127b0a9

Browse files
committed
feat(paddlejs-examples): add ocr weixin miniprogram example
1 parent 44a26c2 commit 127b0a9

File tree

729 files changed

+284386
-8479
lines changed

Some content is hidden

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

729 files changed

+284386
-8479
lines changed

.commitlintrc.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

.eslintignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
**/*.d.ts
2+
node_modules
3+
packages/paddlejs-enc/**/*
4+
packages/paddlejs-mediapipe/opencv/**/*

.eslintrc.cjs

Lines changed: 0 additions & 15 deletions
This file was deleted.

.eslintrc.json

Lines changed: 266 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,266 @@
1+
{
2+
"extends": "standard",
3+
"parser": "@typescript-eslint/parser",
4+
"env": {
5+
"es6": true,
6+
"node": true,
7+
"browser": true,
8+
"jest": true
9+
},
10+
"globals": {
11+
"GPUBuffer": true,
12+
"GPUDevice": true,
13+
"GPUQueue": true,
14+
"GPUAdapter": true,
15+
"GPUComputePipeline": true,
16+
"GPUCommandEncoder": true,
17+
"GPUBindGroupLayout": true,
18+
"GPUBindGroup": true,
19+
"bool": true,
20+
"f32": true,
21+
"i32": true,
22+
"Obj": true,
23+
"Value": true,
24+
"isString": true,
25+
"isDefined": true,
26+
"Arr": true,
27+
"page": true
28+
},
29+
"plugins": [
30+
"standard",
31+
"@typescript-eslint",
32+
"import",
33+
"promise"
34+
],
35+
"rules": {
36+
"array-bracket-spacing": ["error", "never"],
37+
"arrow-parens": ["error", "as-needed"],
38+
"arrow-spacing": "error",
39+
"brace-style": ["warn", "stroustrup"],
40+
"comma-dangle": "error",
41+
"computed-property-spacing": ["error", "never"],
42+
"curly": ["error", "all"],
43+
"default-case": [
44+
"error",
45+
{
46+
"commentPattern": "^skip\\sdefault"
47+
}
48+
],
49+
"dot-notation": "off",
50+
"eqeqeq": [
51+
"error",
52+
"always",
53+
{
54+
"null": "ignore"
55+
}
56+
],
57+
"func-call-spacing": "error",
58+
"generator-star-spacing": [
59+
"error",
60+
{
61+
"before": false,
62+
"after": true
63+
}
64+
],
65+
"guard-for-in": "warn",
66+
"indent": [
67+
"error",
68+
4,
69+
{
70+
"SwitchCase": 1,
71+
"VariableDeclarator": 1,
72+
"outerIIFEBody": 1,
73+
"MemberExpression": 1,
74+
"FunctionDeclaration": {
75+
"parameters": 1,
76+
"body": 1
77+
},
78+
"FunctionExpression": {
79+
"parameters": 1,
80+
"body": 1
81+
},
82+
"CallExpression": {
83+
"arguments": 1
84+
},
85+
"ArrayExpression": 1,
86+
"ObjectExpression": 1,
87+
"ImportDeclaration": 1,
88+
"flatTernaryExpressions": false,
89+
"ignoreComments": false
90+
}
91+
],
92+
"jsx-quotes": ["error", "prefer-double"],
93+
"keyword-spacing": "error",
94+
"lines-around-comment": "off",
95+
"max-depth": ["error", 6],
96+
"max-len": [
97+
"error",
98+
{
99+
"code": 120,
100+
"tabWidth": 4,
101+
"ignoreUrls": true,
102+
"ignoreComments": true
103+
}
104+
],
105+
"max-lines": [
106+
"error",
107+
{
108+
"max": 1000,
109+
"skipBlankLines": true,
110+
"skipComments": true
111+
}
112+
],
113+
"max-lines-per-function": [
114+
"error",
115+
{
116+
"max": 100,
117+
"skipBlankLines": true,
118+
"skipComments": true
119+
}
120+
],
121+
"max-nested-callbacks": "warn",
122+
"max-params": ["error", 6],
123+
"max-statements": ["error", 70],
124+
"max-statements-per-line": "error",
125+
"multiline-comment-style": ["warn", "separate-lines"],
126+
"new-parens": "warn",
127+
"no-bitwise": "warn",
128+
"no-class-assign": "warn",
129+
"no-confusing-arrow": [
130+
"warn",
131+
{
132+
"allowParens": true
133+
}
134+
],
135+
"no-console": "warn",
136+
"no-constant-condition": "warn",
137+
"no-debugger": "warn",
138+
"no-delete-var": "warn",
139+
"no-dupe-class-members": "warn",
140+
"no-dupe-keys": "warn",
141+
"no-duplicate-imports": "warn",
142+
"no-else-return": "error",
143+
"no-empty": "error",
144+
"no-eval": "warn",
145+
"no-extra-bind": "warn",
146+
"no-extra-boolean-cast": "warn",
147+
"no-func-assign": "warn",
148+
"no-global-assign": "error",
149+
"no-implied-eval": "warn",
150+
"no-inner-declarations": "warn",
151+
"no-irregular-whitespace": "warn",
152+
"no-label-var": "warn",
153+
"no-labels": [
154+
"warn",
155+
{
156+
"allowLoop": true
157+
}
158+
],
159+
"no-lone-blocks": "warn",
160+
"no-loop-func": "warn",
161+
"no-multi-spaces": [
162+
"error",
163+
{
164+
"exceptions": {
165+
"Property": true,
166+
"BinaryExpression": true,
167+
"ImportDeclaration": true
168+
}
169+
}
170+
],
171+
"no-multi-str": "warn",
172+
"eol-last": 0,
173+
"no-multiple-empty-lines": [
174+
"error",
175+
{
176+
"max": 3,
177+
"maxEOF": 1
178+
}
179+
],
180+
"no-empty-pattern": "warn",
181+
"no-octal": "warn",
182+
"no-octal-escape": "warn",
183+
"no-param-reassign": "error",
184+
"no-redeclare": "warn",
185+
"no-this-before-super": "warn",
186+
"no-undef-init": "warn",
187+
"no-unneeded-ternary": "warn",
188+
"no-unused-vars": "off",
189+
"no-use-before-define": ["warn", "nofunc"],
190+
"no-useless-constructor": "warn",
191+
"no-var": "error",
192+
"no-void": "error",
193+
"padded-blocks": "off",
194+
"no-with": "warn",
195+
"one-var": ["warn", "never"],
196+
"operator-linebreak": ["error", "before"],
197+
"prefer-const": "error",
198+
"prefer-rest-params": "error",
199+
"prefer-spread": "error",
200+
"quote-props": ["warn", "consistent-as-needed"],
201+
"quotes": ["error", "single"],
202+
"radix": "error",
203+
"semi": ["error", "always"],
204+
"semi-spacing": "error",
205+
"semi-style": ["error", "last"],
206+
"space-before-function-paren": [
207+
"error",
208+
{
209+
"anonymous": "always",
210+
"named": "never"
211+
}
212+
],
213+
"space-unary-ops": "warn",
214+
"spaced-comment": [
215+
"error",
216+
"always",
217+
{
218+
"exceptions": ["-", "+", "\""],
219+
"block": {
220+
"balanced": true
221+
}
222+
}
223+
],
224+
"unicode-bom": "warn",
225+
"valid-typeof": "error",
226+
"wrap-iife": ["error", "any"],
227+
"camelcase": "off",
228+
"@typescript-eslint/no-empty-interface": "warn",
229+
"@typescript-eslint/no-explicit-any": "warn",
230+
"@typescript-eslint/no-misused-new": "error",
231+
"@typescript-eslint/no-object-literal-type-assertion": "off",
232+
"@typescript-eslint/no-type-alias": "off",
233+
"@typescript-eslint/no-unused-vars": [
234+
"error",
235+
{
236+
"vars": "all",
237+
"args": "none",
238+
"ignoreRestSiblings": false
239+
}
240+
],
241+
"@typescript-eslint/prefer-function-type": "error",
242+
"import/default": "error",
243+
"import/export": "off",
244+
"import/max-dependencies": "off",
245+
"import/named": "error",
246+
"import/namespace": "error",
247+
"import/newline-after-import": "error",
248+
"import/no-absolute-path": "error",
249+
"import/no-amd": "warn",
250+
"import/no-commonjs": "warn",
251+
"import/no-deprecated": "error",
252+
"import/no-dynamic-require": "off",
253+
"import/no-extraneous-dependencies": "off",
254+
"import/no-internal-modules": "off",
255+
"import/no-mutable-exports": "off",
256+
"import/no-named-as-default": "off",
257+
"import/no-named-as-default-member": "error",
258+
"import/no-namespace": "off",
259+
"import/no-nodejs-modules": "off",
260+
"import/no-restricted-paths": "off",
261+
"import/no-unassigned-import": "off",
262+
"import/no-webpack-loader-syntax": "warn",
263+
"import/order": "warn",
264+
"import/prefer-default-export": "off"
265+
}
266+
}

.github/workflows/ut.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
# This workflow will install Deno and run tests across stable and nightly builds on Windows, Ubuntu and macOS.
7+
# For more information see: https://github.com/denolib/setup-deno
8+
9+
name: Run Unit Test
10+
11+
on:
12+
push:
13+
branches: [master]
14+
pull_request:
15+
branches: [master]
16+
17+
jobs:
18+
test:
19+
runs-on: macOS-latest # runs a test on Ubuntu, Windows and macOS
20+
21+
steps:
22+
- name: Setup repo
23+
uses: actions/checkout@v2
24+
25+
- uses: actions/setup-node@v2
26+
with:
27+
node-version: '12'
28+
29+
- run: npm install
30+
31+
- run: npm install canvas --canvas_binary_host_mirror=https://registry.npmmirror.com/-/binary/canvas
32+
33+
- name: Run Tests
34+
run: npm test
35+
env:
36+
CI: true
37+
- name: Coveralls GitHub Action
38+
uses: coverallsapp/github-action@master
39+
with:
40+
github-token: ${{ secrets.GITHUB_TOKEN }}
41+
path-to-lcov: ./packages/paddlejs-core/coverage/lcov.info

.gitignore

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,13 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
7-
pnpm-debug.log*
8-
lerna-debug.log*
91

10-
node_modules
112
.DS_Store
3+
node_modules
4+
miniprogram_npm
125
dist
13-
dist-ssr
6+
lib
147
coverage
15-
*.local
16-
17-
/cypress/videos/
18-
/cypress/screenshots/
19-
20-
# Editor directories and files
21-
.vscode/*
22-
!.vscode/extensions.json
8+
.cache
9+
lerna-debug.log
10+
.vscode
2311
.idea
24-
*.suo
25-
*.ntvs*
26-
*.njsproj
27-
*.sln
28-
*.sw?
12+
!e2e/dist
13+
e2e/dist/*_bundle.js

.husky/commit-msg

Lines changed: 0 additions & 4 deletions
This file was deleted.

.husky/pre-commit

Lines changed: 0 additions & 4 deletions
This file was deleted.

.prettierrc.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

.travis.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
language: node_js
2+
node_js:
3+
- 10
4+
install:
5+
|
6+
npm --version
7+
npm install --registry http://registry.npmjs.org
8+
script:
9+
- npm run test

0 commit comments

Comments
 (0)