Skip to content

Commit d69b817

Browse files
committed
Fork off from shallot
0 parents  commit d69b817

20 files changed

+5871
-0
lines changed

.eslintignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules/**/*
2+
coverage/**/*
3+
dist/**/*
4+
.github/**/*

.eslintrc.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"parser": "@typescript-eslint/parser",
3+
"parserOptions": {
4+
"ecmaVersion": 2020,
5+
"sourceType": "module"
6+
},
7+
"extends": [
8+
"plugin:@typescript-eslint/recommended",
9+
"prettier/@typescript-eslint",
10+
"plugin:prettier/recommended"
11+
],
12+
"rules": {
13+
"strict": 2
14+
}
15+
}

.github/workflows/npm-publish.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Shallot Package Release
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
test:
9+
name: Run unit tests
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Check out Git repository
13+
uses: actions/checkout@v2
14+
with:
15+
ref: ${{ github.event.release.target_commitish }}
16+
17+
- name: Set up Node.js
18+
uses: actions/setup-node@v1
19+
with:
20+
node-version: 12
21+
22+
- name: Install dependencies
23+
run: yarn install --frozen-lockfile
24+
25+
- name: Run unit tests
26+
run: yarn test
27+
28+
publish:
29+
name: Publish to NPM
30+
needs: [test]
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Check out Git repository
34+
uses: actions/checkout@v2
35+
with:
36+
ref: ${{ github.event.release.target_commitish }}
37+
38+
- name: Set up Node.js
39+
uses: actions/setup-node@v1
40+
with:
41+
node-version: 12
42+
always-auth: true
43+
registry-url: 'https://registry.npmjs.org'
44+
45+
- name: Install dependencies
46+
run: yarn install --frozen-lockfile
47+
48+
- name: Set bot git config name
49+
run: git config --global user.name "GitHub CD bot"
50+
51+
- name: Set bot git config email
52+
run: git config --global user.email "[email protected]"
53+
54+
- name: Create a new release version
55+
run: yarn version --new-version ${{ github.event.release.tag_name }}
56+
env:
57+
github-token: ${{ secrets.GITHUB_TOKEN }}
58+
59+
- name: Build a prod version
60+
run: yarn build
61+
62+
- name: Publish to NPM
63+
run: yarn publish
64+
env:
65+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/open-pr.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Shallot PR Validation
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened, edited, synchronize]
6+
7+
jobs:
8+
lint:
9+
name: Run linting
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Check out Git repository
13+
uses: actions/checkout@v2
14+
with:
15+
ref: ${{ github.event.release.target_commitish }}
16+
17+
- name: Set up Node.js
18+
uses: actions/setup-node@v1
19+
with:
20+
node-version: 12
21+
22+
- name: Install dependencies
23+
run: yarn install --frozen-lockfile
24+
25+
- name: Run eslint
26+
run: yarn eslint
27+
28+
- name: Run prettier
29+
run: yarn prettier -c .
30+
31+
test:
32+
name: Run tests
33+
runs-on: ubuntu-latest
34+
steps:
35+
- name: Check out Git repository
36+
uses: actions/checkout@v2
37+
with:
38+
ref: ${{ github.event.release.target_commitish }}
39+
40+
- name: Set up Node.js
41+
uses: actions/setup-node@v1
42+
with:
43+
node-version: 12
44+
45+
- name: Install dependencies
46+
run: yarn install --frozen-lockfile
47+
48+
- name: Run unit tests
49+
uses: mattallty/jest-github-action@v1
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
node_modules
2+
yarn-error.log
3+
npm-debug.*
4+
5+
dist
6+
7+
coverage
8+
9+
.vscode
10+
.DS_Store

.huskyrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"hooks": {
3+
"pre-commit": "lint-staged"
4+
}
5+
}

.lintstagedrc.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"**/*.ts": ["eslint --fix"],
3+
"*": ["prettier --write"]
4+
}

.npmignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
tests
2+
coverage
3+
jest.config.ts
4+
5+
.github
6+
7+
*.md
8+
9+
.huskyrc.json
10+
.lintstagedrc.json
11+
.eslintignore
12+
.eslintrc.json
13+
.prettierignore
14+
.prettierrc.json
15+
16+
yarn-error.log
17+
18+
src
19+
20+
webpack.config.ts
21+
tsconfig.json

.prettierignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules
2+
coverage
3+
.*ignore
4+
yarn*
5+
dist
6+
.github

.prettierrc.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"singleQuote": true,
3+
"printWidth": 90
4+
}

0 commit comments

Comments
 (0)