Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishiv committed Jun 24, 2024
0 parents commit 3ae32f4
Show file tree
Hide file tree
Showing 39 changed files with 5,338 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
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 }}"
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
.vscode
.DS_Store
dist
9 changes: 9 additions & 0 deletions Makefile
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
Loading

0 comments on commit 3ae32f4

Please sign in to comment.