Skip to content

Commit

Permalink
feat: test infra, ci infra, readme
Browse files Browse the repository at this point in the history
  • Loading branch information
swernerx committed Jan 10, 2023
1 parent 5602cd1 commit 34d0811
Show file tree
Hide file tree
Showing 10 changed files with 17,773 additions and 436 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 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
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Test

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ${{ matrix.platform }}

strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
platform: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 7
- name: Use Node.js ${{ matrix.node-version }} on ${{ matrix.platform }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- run: pnpm install
- run: npm run build
- run: npm test

- run: npm run check:examples
- run: npm run build:examples
35 changes: 35 additions & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Changes over the default config are marked with a double exclamation mark.

# We generally allow wider code lines, but for auto formatting this
# is quite a good rule to produce readable code.
# In ESLint we allow for code being 110 character long, comments 140 characters.
# With auto formatting in place and the current heuristics of prettier it works
# better with a default of 80 characters per line though. (default = 80)
printWidth: 80

# Use two spaces for tabs (default = 2)
tabWidth: 2

# Unify with convention used in JSX, HTML and CSS to use double quotes (default = false)
singleQuote: false

# Quote properties as needed (default = as-needed)
quoteProps: as-needed

# Keep using double quotes in JSX like in HTML. (default: false)
jsxSingleQuote: false

# Don't use semicolons where they are not required (default = true !!)
semi: false

# Don't do stupid trailing commas reducing noise ratio. (default = es5 !!)
trailingComma: none

# More space is better for readability (default = true)
bracketSpacing: true

# Put the > of a multi-line JSX element at the end of the last line (default = false)
bracketSameLine: false

# Put parens of around arguments of arrow functions (default = always)
arrowParens: always
8 changes: 8 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"git": {
"commitMessage": "chore: release v${version}"
},
"github": {
"release": true
}
}
6 changes: 6 additions & 0 deletions babel.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
presets: [
'@babel/preset-typescript',
['@babel/preset-env', {targets: {node: 'current'}}]
],
};
Loading

0 comments on commit 34d0811

Please sign in to comment.