Skip to content
This repository was archived by the owner on Apr 25, 2023. It is now read-only.

Commit ff930b1

Browse files
authored
Merge branch 'master' into patch-1
2 parents 013ca73 + 1f7a377 commit ff930b1

36 files changed

+7862
-3121
lines changed

.circleci/config.yml

Lines changed: 89 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,98 @@
1-
version: 2
2-
jobs:
3-
build:
1+
version: 2.1
2+
3+
executors:
4+
default:
45
docker:
5-
# specify the version you desire here
6-
- image: circleci/node:8.10.0
7-
8-
# Specify service dependencies here if necessary
9-
# CircleCI maintains a library of pre-built images
10-
# documented at https://circleci.com/docs/2.0/circleci-images/
11-
# - image: circleci/mongo:3.4.4
6+
- image: circleci/node:12
7+
working_directory: ~/project
128

13-
working_directory: ~/repo
9+
commands:
10+
attach_project:
11+
steps:
12+
- attach_workspace:
13+
at: ~/project
1414

15+
jobs:
16+
install-dependencies:
17+
executor: default
1518
steps:
1619
- checkout
17-
18-
# Download and cache dependencies
20+
- attach_project
21+
- restore_cache:
22+
keys:
23+
- dependencies-{{ checksum "package.json" }}
24+
- dependencies-
1925
- restore_cache:
2026
keys:
21-
- v1-dependencies-{{ checksum "package.json" }}
22-
# fallback to using the latest cache if no exact match is found
23-
- v1-dependencies-
27+
- dependencies-example-{{ checksum "example/package.json" }}
28+
- dependencies-example-
29+
- run:
30+
name: Install dependencies
31+
command: |
32+
yarn install --cwd example --frozen-lockfile
33+
yarn install --frozen-lockfile
34+
- save_cache:
35+
key: dependencies-{{ checksum "package.json" }}
36+
paths: node_modules
37+
- save_cache:
38+
key: dependencies-example-{{ checksum "example/package.json" }}
39+
paths: example/node_modules
40+
- persist_to_workspace:
41+
root: .
42+
paths: .
2443

25-
- run: yarn install
26-
- run: yarn prepare
44+
lint:
45+
executor: default
46+
steps:
47+
- attach_project
48+
- run:
49+
name: Lint files
50+
command: |
51+
yarn lint
2752
28-
- save_cache:
29-
paths:
30-
- node_modules
31-
key: v1-dependencies-{{ checksum "package.json" }}
32-
33-
# run tests!
34-
- run: yarn lint
35-
- run: yarn tsc
36-
- run: yarn test
53+
typescript:
54+
executor: default
55+
steps:
56+
- attach_project
57+
- run:
58+
name: Typecheck files
59+
command: |
60+
yarn typescript
61+
62+
unit-tests:
63+
executor: default
64+
steps:
65+
- attach_project
66+
- run:
67+
name: Run unit tests
68+
command: |
69+
yarn test --coverage
70+
- store_artifacts:
71+
path: coverage
72+
destination: coverage
73+
74+
build:
75+
executor: default
76+
steps:
77+
- attach_project
78+
- run:
79+
name: Build package
80+
command: |
81+
yarn prepare
82+
83+
workflows:
84+
build-and-test:
85+
jobs:
86+
- install-dependencies
87+
- lint:
88+
requires:
89+
- install-dependencies
90+
- typescript:
91+
requires:
92+
- install-dependencies
93+
- unit-tests:
94+
requires:
95+
- install-dependencies
96+
- build:
97+
requires:
98+
- install-dependencies

.eslintrc

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
},
55
"extends": "react-native-wcandillon",
66
"rules": {
7-
8-
}
9-
}
7+
8+
},
9+
"ignorePatterns": [
10+
"node_modules/",
11+
"lib/",
12+
"example/babel.config.js",
13+
"example/metro.config.js",
14+
"example/webpack.config.js",
15+
"scripts/bootstrap.js"
16+
]
17+
}

.gitattributes

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

.gitignore

Lines changed: 57 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,63 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
7-
8-
# Runtime data
9-
pids
10-
*.pid
11-
*.seed
12-
*.pid.lock
13-
14-
# Directory for instrumented libs generated by jscoverage/JSCover
15-
lib-cov
16-
17-
# Coverage directory used by tools like istanbul
18-
coverage
19-
20-
# nyc test coverage
21-
.nyc_output
22-
23-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24-
.grunt
25-
26-
# Bower dependency directory (https://bower.io/)
27-
bower_components
28-
29-
# node-waf configuration
30-
.lock-wscript
31-
32-
# Compiled binary addons (https://nodejs.org/api/addons.html)
33-
build/Release
34-
35-
# Dependency directories
1+
# OSX
2+
#
3+
.DS_Store
4+
5+
# XDE
6+
.expo/
7+
8+
# VSCode
9+
.vscode/
10+
jsconfig.json
11+
12+
# Xcode
13+
#
14+
build/
15+
*.pbxuser
16+
!default.pbxuser
17+
*.mode1v3
18+
!default.mode1v3
19+
*.mode2v3
20+
!default.mode2v3
21+
*.perspectivev3
22+
!default.perspectivev3
23+
xcuserdata
24+
*.xccheckout
25+
*.moved-aside
26+
DerivedData
27+
*.hmap
28+
*.ipa
29+
*.xcuserstate
30+
project.xcworkspace
31+
32+
# Android/IJ
33+
#
34+
.idea
35+
.gradle
36+
local.properties
37+
android.iml
38+
39+
# Cocoapods
40+
#
41+
example/ios/Pods
42+
43+
# node.js
44+
#
3645
node_modules/
37-
jspm_packages/
38-
39-
# TypeScript v1 declaration files
40-
typings/
41-
42-
# Optional npm cache directory
43-
.npm
44-
45-
# Optional eslint cache
46-
.eslintcache
46+
npm-debug.log
47+
yarn-debug.log
48+
yarn-error.log
4749

48-
# Optional REPL history
49-
.node_repl_history
50+
# BUCK
51+
buck-out/
52+
\.buckd/
53+
android/app/libs
54+
android/keystores/debug.keystore
5055

51-
# Output of 'npm pack'
52-
*.tgz
53-
54-
# Yarn Integrity file
55-
.yarn-integrity
56-
57-
# dotenv environment variables file
58-
.env
59-
60-
# next.js build output
61-
.next
56+
# Expo
57+
.expo/*
6258

6359
# generated by bob
60+
lib/
6461
dist/
62+
63+
.idea/

.husky/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
yarn commitlint -E HUSKY_GIT_PARAMS

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
yarn lint && yarn typescript

.yarnrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Override Yarn command so we can automatically setup the repo on running `yarn`
2+
3+
yarn-path "scripts/bootstrap.js"

0 commit comments

Comments
 (0)