Skip to content

Commit 23a5643

Browse files
committed
Initial commit
1 parent b8b3956 commit 23a5643

26 files changed

+7350
-40
lines changed

.babelrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: [['@anansi', { typing: 'typescript' }]],
3+
};

.browserslistrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
extends @anansi/browserslist-config

.circleci/config.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# Javascript Node CircleCI 2.1 configuration file
2+
#
3+
# Check https://circleci.com/docs/2.1/language-javascript/ for more details
4+
#
5+
version: 2.1
6+
jobs:
7+
setup:
8+
docker: &docker
9+
# specify the version you desire here
10+
- image: circleci/node:16
11+
steps:
12+
- checkout
13+
# Download and cache dependencies
14+
- restore_cache:
15+
keys:
16+
- v1-dependencies-{{ checksum "yarn.lock" }}
17+
# fallback to using the latest cache if no exact match is found
18+
- v1-dependencies-
19+
- run:
20+
name: yarn install
21+
command: |
22+
sudo corepack enable
23+
yarn install --immutable
24+
yarn build:pkg
25+
- save_cache:
26+
paths:
27+
- .yarn/cache
28+
- .yarn/install-state.gz
29+
key: v1-dependencies-{{ checksum "yarn.lock" }}
30+
- persist_to_workspace:
31+
root: ~/
32+
paths:
33+
- project
34+
35+
build:
36+
docker: *docker
37+
steps:
38+
- attach_workspace:
39+
at: ~/
40+
- run: yarn run build
41+
42+
lint:
43+
parallelism: 1
44+
docker: *docker
45+
steps:
46+
- attach_workspace:
47+
at: ~/
48+
- run:
49+
#- run: yarn run lint packages/*/src
50+
command: |
51+
FILES=$(circleci tests glob "src/**/*.[jt]{s,}" | circleci tests split --split-by=timings)
52+
yarn lint $FILES
53+
54+
55+
unit_tests:
56+
parallelism: 2
57+
docker: *docker
58+
steps:
59+
- attach_workspace:
60+
at: ~/
61+
- run:
62+
command: |
63+
FILES=$(circleci tests glob "src/**/*.test.[jt]{s,}" | circleci tests split --split-by=timings)
64+
yarn test:ci -- -- --maxWorkers=4 $FILES
65+
66+
test_coverage:
67+
parallelism: 2
68+
docker: *docker
69+
steps:
70+
- attach_workspace:
71+
at: ~/
72+
- run:
73+
command: |
74+
FILES=$(circleci tests glob "dist/**/*.test.[jt]{s,}" | circleci tests split --split-by=timings)
75+
if [ "$COVERALLS_REPO_TOKEN" != "" ]; then yarn run test:coverage --maxWorkers=4 --coverageReporters=text-lcov $FILES | yarn run coveralls; fi
76+
77+
salus:
78+
machine: true
79+
steps:
80+
- checkout
81+
- run: docker run -t -v $(pwd):/home/repo coinbase/salus
82+
83+
workflows:
84+
version: 2
85+
build:
86+
jobs:
87+
- setup
88+
89+
- unit_tests:
90+
requires:
91+
- setup
92+
- test_coverage:
93+
requires:
94+
- setup
95+
96+
- lint:
97+
requires:
98+
- setup
99+
- build:
100+
requires:
101+
- setup
102+
- salus

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
end_of_line = lf
7+
indent_size = 2
8+
indent_style = space
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
12+
[*.py]
13+
indent_size = 4

.eslintrc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
extends: 'plugin:@anansi/typescript',
3+
env: { node: true },
4+
};

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.svg binary

.github/workflows/npm-publish.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Publish Package to npmjs
2+
on:
3+
release:
4+
types: [published]
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
# Setup .npmrc file to publish to npm
11+
- uses: actions/setup-node@v3
12+
with:
13+
node-version: '16.x'
14+
registry-url: 'https://registry.npmjs.org'
15+
# Defaults to the user or organization that owns the workflow file
16+
scope: '@octocat'
17+
- run: yarn
18+
- run: yarn build:clean
19+
- run: yarn build
20+
- run: yarn publish
21+
env:
22+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.pnp.*
2+
.yarn/*
3+
!.yarn/patches
4+
!.yarn/plugins
5+
!.yarn/releases
6+
!.yarn/sdks
7+
!.yarn/versions
8+
9+
node_modules/
10+
dist/
11+
dist-server/
12+
coverage/
13+
lib/

.jest/setup.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import 'jest-axe/extend-expect';
2+
import '@testing-library/jest-dom/extend-expect';

.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"printWidth": 80,
3+
"semi": true,
4+
"singleQuote": true,
5+
"trailingComma": "all"
6+
}

0 commit comments

Comments
 (0)