Skip to content

Commit

Permalink
refactor(dev): update dev tooling and bundling
Browse files Browse the repository at this point in the history
  • Loading branch information
dysfunc committed Jan 14, 2024
1 parent 55f716e commit f5fc1e6
Show file tree
Hide file tree
Showing 18 changed files with 3,811 additions and 14,128 deletions.
35 changes: 23 additions & 12 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,46 @@
name: Unit Tests (Vitest)

name: Unit Tests
on:
push:
branches:
- main
paths:
- src/**
pull_request:
types: [opened, synchronize, reopened]

jobs:
build:
tests:
runs-on: ubuntu-latest
name: Tests
if: |
(
!contains(github.event.head_commit.message, '[skip ci]') &&
!contains(github.event.head_commit.message, 'version bump')
)
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- name: Checkout repository
uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
node-version: '18'
version: 8.11
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 20
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org'
- uses: szenius/[email protected]
- name: Install dependencies
run: pnpm install
- name: Set Timezone
uses: szenius/[email protected]
with:
timezoneLinux: "America/Los_Angeles"
timezoneMacos: "America/Los_Angeles"
timezoneWindows: "Pacific Standard Time"
- run: npm i
- run: npm test

- uses: actions/upload-artifact@v2
- name: Run tests
run: pnpm test
- name: Upload artifacts
uses: actions/upload-artifact@v2
if: failure()
with:
name: unit-tests
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
.vercel
/node_modules
/dist
.package-lock.json

# testing
coverage
Expand Down
2 changes: 1 addition & 1 deletion .husky/post-merge
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ check() {
echo "$changes" | grep --quiet "$1" && eval "$2"
}

check package.json "npm install"
check package.json "pnpm install"
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

. "$(dirname "$0")/_/husky.sh"

npx lint-staged
pnpm dlx lint-staged
3 changes: 2 additions & 1 deletion .lintstagedrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"./src/**/*.{test.js,js,json,svelte}": [
"./src/**/*.{test.js,js,ts,json,svelte}": [
"svelte-check --tsconfig ./tsconfig.json",
"eslint -c ./.eslintrc.json --fix",
"prettier --write"
]
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@ Try it in the [Svelte REPL](https://svelte.dev/repl/cae0ce6e92634878b6e1a587146d
## Install

```bash
yarn add -D @svelte-plugins/datepicker
# npm
> npm install svelte @svelte-plugins/datepicker

# or with NPM
# pnpm
> pnpm install svelte @svelte-plugins/datepicker

npm i -D @svelte-plugins/datepicker
# yarn
> yarn add svelte @svelte-plugins/datepicker
```

## Using the DatePicker component
Expand Down
7 changes: 0 additions & 7 deletions babel.config.json

This file was deleted.

28 changes: 17 additions & 11 deletions docs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f5fc1e6

Please sign in to comment.