-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 3ae32f4
Showing
39 changed files
with
5,338 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/[email protected] | ||
with: | ||
persist-credentials: false | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: "18.x" | ||
cache: "npm" | ||
|
||
- name: Install | ||
run: env NODE_ENV=development npm install --prefer-offline --no-audit | ||
- name: Test | ||
run: npm run typecheck && npm run test | ||
|
||
- name: Build | ||
run: env NODE_ENV=production npm run build | ||
|
||
- run: jq -s 'add' package.json package-publish.json > package-final.json && rm -rf package.json && mv package-final.json package.json | ||
|
||
- id: Publish | ||
uses: JS-DevTools/npm-publish@v1 | ||
with: | ||
registry: "https://registry.npmjs.org/" | ||
token: ${{ secrets.NPM_TOKEN }} | ||
access: "public" | ||
check-version: true | ||
- if: steps.publish.outputs.type != 'none' | ||
run: | | ||
echo "Version changed: ${{ steps.publish.outputs.old-version }} => ${{ steps.publish.outputs.version }}" |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node_modules | ||
.vscode | ||
.DS_Store | ||
dist |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
.SHELL := /usr/bin/bash | ||
|
||
.PHONY: build | ||
build: | ||
npx tsc --resolveJsonModule -p ./tsconfig.json --outDir ./dist --emitDeclarationOnly --declaration | ||
|
||
npx esbuild ./src/index.ts --bundle --format=esm --outfile=dist/index.js --packages=external --target=es2022 --sourcemap --minify | ||
npx esbuild ./src/core/index.ts --bundle --format=esm --outfile=dist/core/index.js --packages=external --target=es2022 --sourcemap --minify |
Oops, something went wrong.