Skip to content

Commit 9cc030d

Browse files
authored
Merge pull request #124 from retyui/update-repository
Update library tools & example
2 parents e2772d7 + ef34be6 commit 9cc030d

File tree

82 files changed

+14571
-8282
lines changed

Some content is hidden

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

82 files changed

+14571
-8282
lines changed

.circleci/config.yml

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

.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

.eslintrc.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
root: true,
3+
extends: ['@react-native', 'plugin:prettier/recommended'],
4+
ignorePatterns: ['node_modules/', 'lib/'],
5+
};

.flowconfig

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

.gitattributes

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
*.pbxproj -text
1+
*.pbxproj -text
2+
# specific for windows script files
3+
*.bat text eol=crlf

.github/actions/install-dependencies/action.yml

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ inputs:
44
node-version:
55
description: 'The Node.js version to set up'
66
required: false
7-
7+
lookup-only:
8+
description: 'If true, only checks if cache entry exists and skips download. Default: false'
9+
required: false
10+
default: false
811

912
runs:
1013
using: 'composite'
@@ -13,13 +16,46 @@ runs:
1316
with:
1417
node-version: ${{ inputs.node-version }}
1518

19+
20+
- name: Restore example node_modules from cache
21+
uses: actions/cache/restore@v3
22+
id: restore_example_node_modules
23+
with:
24+
key: ${{ runner.os }}-yarn-example-${{ hashFiles('./example/yarn.lock') }}
25+
restore-keys: ${{ runner.os }}-yarn-example-
26+
path: ${{ github.workspace }}/example/node_modules
27+
lookup-only: ${{ inputs.lookup-only }}
28+
29+
30+
- name: Install example node_modules
31+
if: steps.restore_example_node_modules.outputs.cache-hit != 'true'
32+
shell: bash
33+
working-directory: example
34+
run: |
35+
# Retry 3 times before the steps actually fails
36+
(echo "===== Install node_modules Attempt: 1 ====" && yarn install --frozen-lockfile) || \
37+
(echo "===== Install node_modules Attempt: 2 ====" && yarn install --frozen-lockfile) || \
38+
(echo "===== Install node_modules Attempt: 3 ====" && yarn install --frozen-lockfile) || \
39+
(echo "===== Install node_modules Step Failed ====" && exit 1)
40+
41+
42+
- name: Save example node_modules to cache
43+
if: steps.restore_example_node_modules.outputs.cache-hit != 'true'
44+
uses: actions/cache/save@v3
45+
with:
46+
key: ${{ steps.restore_example_node_modules.outputs.cache-primary-key }}
47+
path: ${{ github.workspace }}/example/node_modules
48+
49+
50+
1651
- name: Restore node_modules from cache
1752
uses: actions/cache/restore@v3
1853
id: restore_node_modules
1954
with:
2055
key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
2156
restore-keys: ${{ runner.os }}-yarn-
2257
path: ${{ github.workspace }}/node_modules
58+
lookup-only: ${{ inputs.lookup-only }}
2359

2460

2561
- name: Install node_modules

.github/workflows/main.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ jobs:
2525
with:
2626
fetch-depth: 0
2727
- uses: ./.github/actions/install-dependencies
28+
with:
29+
lookup-only: true
2830

2931
code-quality:
3032
name: Code Quality
@@ -38,10 +40,13 @@ jobs:
3840
- uses: ./.github/actions/install-dependencies
3941

4042
- name: Lint files
41-
run: yarn run test:eslint
43+
run: yarn lint
44+
45+
- name: Types check
46+
run: yarn ts
4247

43-
- name: Flow files
44-
run: yarn run test:flow
48+
- name: Lib build
49+
run: yarn build
4550

4651
build-android:
4752
name: Build Android

.gitignore

Lines changed: 44 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
21
# OSX
32
#
43
.DS_Store
54

6-
# node.js
7-
#
8-
node_modules/
9-
npm-debug.log
10-
yarn-error.log
11-
5+
# XDE
6+
.expo/
7+
8+
# VSCode
9+
.vscode/
10+
jsconfig.json
1211

1312
# Xcode
1413
#
@@ -29,21 +28,51 @@ DerivedData
2928
*.ipa
3029
*.xcuserstate
3130
project.xcworkspace
32-
3331

34-
# Android/IntelliJ
32+
# Android/IJ
3533
#
36-
build/
3734
.idea
3835
.gradle
3936
local.properties
40-
*.iml
37+
android.iml
38+
39+
# Cocoapods
40+
#
41+
example/ios/Pods
42+
43+
# node.js
44+
#
45+
node_modules/
46+
npm-debug.log
47+
yarn-debug.log
48+
yarn-error.log
4149

4250
# BUCK
4351
buck-out/
4452
\.buckd/
45-
*.keystore
53+
android/app/libs
54+
android/keystores/debug.keystore
55+
56+
# Expo
57+
.expo/*
58+
59+
# generated by bob
60+
lib/
61+
62+
#e2e
63+
test-butler-app.apk
64+
example/vendor
65+
66+
#Example
67+
example/ios/Pods
68+
example/vendor
69+
.lefthookrc
70+
lefthook.yml
71+
72+
73+
# Temporary files created by Metro to check the health of the file watcher
74+
.metro-health-check*
4675

47-
# bundle
48-
.tmp/
49-
76+
# testing
77+
/coverage
78+
.cxx

0 commit comments

Comments
 (0)