Skip to content

Commit eeaf9fa

Browse files
committed
Initial commit
0 parents  commit eeaf9fa

Some content is hidden

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

90 files changed

+13980
-0
lines changed

.browserslistrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
last 2 versions
2+
not android < 100
3+
not and_qq < 100
4+
not and_uc < 100
5+
not baidu < 100
6+
not bb < 100
7+
not opera < 1000
8+
not op_mini all
9+
not op_mob < 100
10+
not samsung < 100

.circleci/config.yml

Lines changed: 201 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
# list with all available versions of node.js images
2+
# https://github.com/CircleCI-Public/circleci-dockerfiles/tree/master/node/images
3+
version: 2.1
4+
5+
orbs:
6+
node: circleci/node@3.0.1
7+
8+
defaults: &build-image
9+
docker:
10+
- image: cypress/base:12
11+
environment:
12+
## this enables colors in the output
13+
TERM: xterm
14+
commands:
15+
install_package_dependencies:
16+
description: "Install library dependencies"
17+
steps:
18+
- checkout
19+
- run:
20+
name: Installing dependencies
21+
command: yarn install --frozen-lockfile
22+
23+
unit_test:
24+
description: "Run unit tests"
25+
parameters:
26+
node_version:
27+
type: integer
28+
default: 10
29+
coverage:
30+
type: boolean
31+
default: false
32+
steps:
33+
- run:
34+
name: Running unit tests on Node.js v<< parameters.node_version >> <<# parameters.coverage >>with coverage<</ parameters.coverage >>
35+
command: yarn test<<# parameters.coverage >>:coverage<</ parameters.coverage >>
36+
37+
e2e_tests:
38+
description: "Run integration tests"
39+
steps:
40+
- run:
41+
name: Installing Cypress binaries
42+
command: npx cypress install
43+
44+
- run:
45+
name: Running E2E integration tests
46+
command: yarn cypress
47+
48+
jobs:
49+
install:
50+
<<: *build-image
51+
steps:
52+
- checkout
53+
- restore_cache:
54+
keys:
55+
- c00k-b00k-{{ .Branch }}-{{ checksum "yarn.lock" }}
56+
# fallback to using the latest cache if no exact match is found
57+
- c00k-b00k-
58+
- run:
59+
name: Installing dependencies
60+
command: yarn install --frozen-lockfile
61+
- save_cache:
62+
key: c00k-b00k-{{ .Branch }}-{{ checksum "yarn.lock" }}
63+
paths:
64+
- node_modules
65+
- ~/.cache
66+
- store_artifacts:
67+
path: yarn-error.log
68+
- persist_to_workspace:
69+
root: .
70+
paths:
71+
- node_modules
72+
73+
lint:
74+
<<: *build-image
75+
steps:
76+
- checkout
77+
- attach_workspace:
78+
at: .
79+
- run:
80+
name: Linting library
81+
command: yarn lint
82+
83+
audit:
84+
<<: *build-image
85+
steps:
86+
- checkout
87+
- attach_workspace:
88+
at: .
89+
- run:
90+
name: Auditing all dependencies
91+
command: yarn audit
92+
93+
test_node_10:
94+
docker:
95+
- image: cypress/base:10.18.0
96+
- image: node:10
97+
steps:
98+
- checkout
99+
- install_package_dependencies
100+
- unit_test:
101+
node_version: 10
102+
- e2e_tests
103+
104+
test_node_12:
105+
docker:
106+
- image: cypress/base:12
107+
- image: node:12
108+
steps:
109+
- checkout
110+
- install_package_dependencies
111+
- unit_test:
112+
node_version: 12
113+
coverage: true
114+
- e2e_tests
115+
116+
test_node_14:
117+
docker:
118+
- image: cypress/base:14.0.0
119+
- image: node:14
120+
steps:
121+
- checkout
122+
- install_package_dependencies
123+
- unit_test:
124+
node_version: 14
125+
- e2e_tests
126+
127+
end_to_end_tests:
128+
<<: *build-image
129+
steps:
130+
- checkout
131+
- attach_workspace:
132+
at: .
133+
- e2e_tests
134+
- store_artifacts:
135+
path: cypress/videos
136+
- store_artifacts:
137+
path: cypress/screenshots
138+
- store_test_results:
139+
path: results
140+
141+
build:
142+
<<: *build-image
143+
steps:
144+
- checkout
145+
- attach_workspace:
146+
at: .
147+
- run:
148+
name: Building the library
149+
command: yarn build
150+
- persist_to_workspace:
151+
root: .
152+
paths:
153+
- lib
154+
- store_artifacts:
155+
path: lib
156+
157+
release:
158+
<<: *build-image
159+
steps:
160+
- checkout
161+
- attach_workspace:
162+
at: .
163+
- run:
164+
name: Running semantic-release workflow
165+
command: npx semantic-release
166+
- store_artifacts:
167+
path: release
168+
169+
workflows:
170+
version: 2
171+
"Test, Build & Maybe Deploy":
172+
jobs:
173+
- install
174+
- lint:
175+
requires:
176+
- install
177+
# - audit:
178+
# requires:
179+
# - install
180+
- test_node_10
181+
- test_node_12
182+
- test_node_14
183+
- end_to_end_tests:
184+
requires:
185+
- install
186+
- build:
187+
requires:
188+
- end_to_end_tests
189+
- test_node_10
190+
- test_node_12
191+
- test_node_14
192+
# - release:
193+
# requires:
194+
# - build
195+
# filters:
196+
# branches:
197+
# only:
198+
# - master
199+
# - next
200+
# - pre/rc
201+
# - beta

.editorconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
end_of_line = lf
9+
insert_final_newline = true
10+
indent_style = space
11+
indent_size = 2

.eslintignore

Whitespace-only changes.

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('./configurations/eslint');

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.DS_Store
2+
.idea/
3+
coverage/
4+
node_modules/
5+
cypress/screenshots/
6+
cypress/videos/
7+
build/
8+
public/
9+
lib/
10+
.stylelintcache
11+
.env
12+
.envrc
13+
report*.json

.huskyrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"hooks": {
3+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
4+
"pre-commit": "lint-staged",
5+
"post-commit": "git update-index --again",
6+
"pre-push": "yarn test",
7+
}
8+
}

.lintstagedrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"./src/**/*.{ts,tsx}": [
3+
"eslint",
4+
"jest --passWithNoTests",
5+
"prettier"
6+
]
7+
}

.npmignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
.git
2+
.idea
3+
.circleci
4+
.github
5+
configurations/
6+
cypress/
7+
scripts/
8+
src/
9+
.browserslistrc
10+
.editorconfig
11+
.eslintignore
12+
.eslintrc.js
13+
.gitignore
14+
.huskyrc
15+
.lintstagedrc
16+
.nvmrc
17+
.prettierignore
18+
.prettierrc.js
19+
babel.config.js
20+
commitlint.config.js
21+
cypress.json
22+
jest.config.js
23+
release.config.js
24+
rollup.config.js
25+
tsconfig.*
26+
webpack.config.js
27+
yarn-error.log

.nvmrc

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

0 commit comments

Comments
 (0)