-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* convert to pnpm * add types node * formatting * bump a few more htings
- Loading branch information
1 parent
9577903
commit ca7bc83
Showing
6 changed files
with
8,090 additions
and
7,872 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,41 +13,74 @@ jobs: | |
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: '10.x' | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
- uses: actions/cache@v1 | ||
id: yarn-cache | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: ${{ runner.os }}-yarn- | ||
- run: yarn install --frozen-lockfile | ||
- run: npm run build | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 7 | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
id: pnpm-store | ||
run: echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
|
||
- name: Use pnpm store | ||
uses: actions/cache@v3 | ||
id: pnpm-cache | ||
with: | ||
path: ${{ steps.pnpm-store.outputs.pnpm_cache_dir }} | ||
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm- | ||
- name: Install Dependencies | ||
run: pnpm install --frozen-lockfile --prefer-offline | ||
|
||
- run: pnpm build | ||
|
||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: '10.x' | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
- uses: actions/cache@v1 | ||
id: yarn-cache | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: ${{ runner.os }}-yarn- | ||
- run: yarn install --frozen-lockfile | ||
- run: yarn test | ||
- uses: codecov/codecov-action@v1 | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 7 | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
id: pnpm-store | ||
run: echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
|
||
- name: Use pnpm store | ||
uses: actions/cache@v3 | ||
id: pnpm-cache | ||
with: | ||
path: ${{ steps.pnpm-store.outputs.pnpm_cache_dir }} | ||
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm- | ||
- name: Install Dependencies | ||
run: pnpm install --frozen-lockfile --prefer-offline | ||
- run: pnpm test | ||
- uses: codecov/codecov-action@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ example | |
.editorconfig | ||
.gitignore | ||
yarn.lock | ||
pnpm-lock.yaml | ||
.rpt2_cache | ||
coverage | ||
packages | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,13 +5,13 @@ | |
"author": "jdecroock <[email protected]> (https://twitter.com/JoviDeC)", | ||
"private": false, | ||
"scripts": { | ||
"build": "rimraf dist && yarn build:preact && yarn build:react", | ||
"build": "rimraf dist && pnpm build:preact && pnpm build:react", | ||
"build:react": "microbundle --define process.env.NODE_ENV=production --external react --name hoofd --no-compress --output dist/ && cp ./dist/hoofd.module.js ./dist/hoofd.mjs", | ||
"build:preact": "microbundle --define process.env.NODE_ENV=production --external preact --name hoofd --no-compress --output preact/dist --alias react=./preact/preact.ts && cp ./preact/dist/hoofd.module.js ./preact/dist/hoofd.mjs", | ||
"build:ci": "microbundle --define process.env.NODE_ENV=production --external preact --name hoofd --output dist/", | ||
"test": "jest", | ||
"test:watch": "cross-env NODE_ENV=test yarn test -- --watch", | ||
"prepublishOnly": "yarn test && yarn lint && yarn build", | ||
"test:watch": "cross-env NODE_ENV=test pnpm test -- --watch", | ||
"prepublishOnly": "pnpm test && pnpm lint && pnpm build", | ||
"lint": "eslint . --ext .ts,.tsx" | ||
}, | ||
"repository": { | ||
|
@@ -59,11 +59,11 @@ | |
"require": "./preact/dist/hoofd.js" | ||
} | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"@testing-library/jest-dom": "^5.3.0", | ||
"@testing-library/react": "^10.0.2", | ||
"@testing-library/react": "^14.0.0", | ||
"@types/jest": "24.0.23", | ||
"@types/node": "^18.16.1", | ||
"@types/react": "16.9.16", | ||
"@types/react-dom": "16.9.4", | ||
"@typescript-eslint/eslint-plugin": "2.11.0", | ||
|
@@ -78,10 +78,10 @@ | |
"jest-cli": "^26.6.3", | ||
"lint-staged": "9.5.0", | ||
"microbundle": "0.12.4", | ||
"preact": "^10.5.7", | ||
"preact": "^10.13.2", | ||
"prettier": "^2.0.2", | ||
"react": "^17.0.0", | ||
"react-dom": "^17.0.0", | ||
"react": "^18.0.0", | ||
"react-dom": "^18.0.0", | ||
"rimraf": "^3.0.2", | ||
"ts-jest": "^26.4.4", | ||
"tslib": "^1.11.1", | ||
|
Oops, something went wrong.