Skip to content

Commit ecac320

Browse files
committed
init
0 parents  commit ecac320

14 files changed

+6212
-0
lines changed

.circleci/config.yml

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
version: 2
2+
3+
references:
4+
pin-npm-version: &pin-npm-version
5+
run:
6+
name: Pin NPM to specified version
7+
command: sudo npm install -g [email protected]
8+
9+
jobs:
10+
test:
11+
docker:
12+
- image: circleci/node:12.16.0
13+
14+
steps:
15+
- *pin-npm-version
16+
- checkout
17+
18+
- restore_cache:
19+
keys:
20+
- jscache-{{ checksum "package.json" }}
21+
- jscache-
22+
23+
- run: npm ci
24+
25+
- save_cache:
26+
paths:
27+
- node_modules
28+
key: jscache-{{ checksum "package.json" }}
29+
30+
- run: npm run lint
31+
32+
publish:
33+
docker:
34+
- image: circleci/node:12.16.0
35+
36+
steps:
37+
- *pin-npm-version
38+
- checkout
39+
- add_ssh_keys:
40+
fingerprints:
41+
- 'd8:ba:31:e6:71:55:e2:a8:a8:9a:0e:d1:6a:01:27:92'
42+
43+
- run:
44+
name: Set branch environemnt variable
45+
command: |
46+
echo '(echo "$CIRCLE_TAG" | grep -Eq ^.*-rc.*$) && export BRANCH=$(echo "$CIRCLE_TAG" | sed "s/^v//" | sed "s/-rc.*//") || export BRANCH="master"' >> $BASH_ENV
47+
source $BASH_ENV
48+
- run: npm version --no-git-tag-version ${CIRCLE_TAG}
49+
- run: git add package.json package-lock.json
50+
- run: git commit -m "Automatic NPM version bump ${CIRCLE_TAG}"
51+
- run: git checkout -b temp
52+
- run: git push origin temp:$BRANCH
53+
- run: npm config set '//registry.npmjs.org/:_authToken' '${NPM_TOKEN}'
54+
- run: npm publish --access public
55+
56+
publish-hot:
57+
docker:
58+
- image: circleci/node:12.16.0
59+
60+
steps:
61+
- *pin-npm-version
62+
- checkout
63+
- run: npm version --no-git-tag-version ${CIRCLE_TAG}
64+
- run: npm config set '//registry.npmjs.org/:_authToken' '${NPM_TOKEN}'
65+
- run: npm publish --access public
66+
67+
workflows:
68+
version: 2
69+
test-and-publish:
70+
jobs:
71+
- test:
72+
filters:
73+
tags:
74+
only: /.*/
75+
- publish:
76+
context: npm-publish
77+
requires:
78+
- test
79+
filters:
80+
tags:
81+
only: /^v[0-9]+(\.[0-9]+)*(-rc\.[0-9]*)*/
82+
branches:
83+
ignore: /.*/
84+
- publish-hot:
85+
context: npm-publish
86+
requires:
87+
- test
88+
filters:
89+
tags:
90+
only: /^v[0-9]+(\.[0-9]+)*-hot/
91+
branches:
92+
ignore: /.*/

.eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
*.d.ts

.eslintrc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": [
3+
"@adgorithmics/eslint-config-base",
4+
"@adgorithmics/eslint-config-base/typescript"
5+
],
6+
"env": {
7+
"node": true
8+
}
9+
}

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
.rpt2_cache

index.node.js

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.web.js

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)