Skip to content

Commit eeae7f8

Browse files
committed
Initial commit
0 parents  commit eeae7f8

31 files changed

+18456
-0
lines changed

.eslintignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# From the .gitignore
2+
coverage
3+
dist
4+
dist-cjs
5+
node_modules
6+
*.log
7+
8+
# Currently many config files are in commonjs
9+
*.cjs

.eslintrc.cjs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const { buildEslintConfig } = require("@snowcoders/renovate-config");
2+
3+
module.exports = {
4+
...buildEslintConfig({
5+
esm: true,
6+
prettier: true,
7+
typescript: true,
8+
}),
9+
env: {
10+
es2019: true,
11+
node: true,
12+
},
13+
};

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bin/index.js text eol=lf

.github/workflows/ci.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3+
4+
name: Node.js CI
5+
6+
on:
7+
pull_request:
8+
branches: ["main"]
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
matrix:
16+
node-version: [16.x, 18.x]
17+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v3
22+
23+
- name: Use Node.js ${{ matrix.node-version }}
24+
uses: actions/setup-node@v3
25+
with:
26+
node-version: ${{ matrix.node-version }}
27+
cache: "npm"
28+
29+
- name: Install
30+
run: npm ci --ignore-scripts
31+
32+
- name: Build
33+
run: npm run build --if-present
34+
35+
- name: Test
36+
run: npm test

.github/workflows/publish.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3+
4+
name: NPM Publish
5+
6+
on:
7+
push:
8+
branches: ["main"]
9+
10+
jobs:
11+
publish:
12+
runs-on: ubuntu-latest
13+
14+
env:
15+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
17+
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v3
21+
22+
- name: Use Node.js lts
23+
uses: actions/setup-node@v3
24+
with:
25+
node-version: lts/*
26+
registry-url: "https://registry.npmjs.org"
27+
28+
- name: Git config
29+
run: |
30+
git config user.name "${GITHUB_ACTOR}"
31+
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
32+
33+
- name: Install
34+
run: npm ci --ignore-scripts
35+
36+
- name: Build
37+
run: npm run build --if-present
38+
39+
- name: Test
40+
run: npm test
41+
42+
- name: NPM config
43+
run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
44+
45+
- name: Publish
46+
run: npx --no release-it -- --ci
47+
continue-on-error: true

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Locally generated files
2+
.DS_Store
3+
.rpt2_cache
4+
coverage
5+
dist
6+
dist-cjs
7+
node_modules
8+
*.log

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npm run husky:commit-msg

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npm run husky:pre-commit

.husky/pre-push

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npm run husky:pre-push

.lintstagedrc.cjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
const configs = require("@snowcoders/renovate-config");
2+
3+
module.exports = configs.lintStaged;

0 commit comments

Comments
 (0)